Clients / Phone Numbers / Create

NameClients / Phone Numbers / Create
DescriptionCreate one or more phone numbers for an existing client
TypePOST
URL/v9/clients/:client_id/phone_numbers
Credential TypeAPI

Long Description

Create one or more phone numbers for an existing client. Note that this takes an array of phone numbers even if only creating one.


Parameters

Name
Description
Type
Presence
LocationLimitations
client_idThe ID of the specific ClientIntegerRequiredURI
labelA label to associate with this phone numberStringOptionalBody20 characters max
country_code
The country calling codeStringOptionalBody
numberThe phone number, should include area codeStringRequiredBody
extensionSpecific extensionStringOptionalBody
is_primaryIndicates if this is the primary phone number for this Client/BooleanOptionalBody


Examples

RequestResponse
POST /v9/clients/168019/phone_numbers

Create a single phone number.

{
  "phone_numbers": [
    {
      "label": "home",
      "country_code": "+1",
      "number": "504-555-0123",
      "extension": null,
      "is_primary": false
    }
  ]
}
{
  "current_page": 1,
  "per_page": 100,
  "total_entries": 1,
  "phone_numbers": [
    {
      "id": 294655,
      "url": "/clients/168019/phone_numbers/294655",
      "country_code": "1",
      "raw_number": "5550123",
      "number": "541-555-0123",
      "extension": null,
      "label": "home",
      "updated_at": "2017-12-15T00:12:21Z"
    }
  ]
}

Create multiple phone numbers for the same client in a single request.

{
  "phone_numbers": [
    {
      "label": "home",
      "country_code": "+1",
      "number": "541-555-0123",
      "extension": null,
      "is_primary": false
    },
    {
      "label": "work",
      "country_code": "+1",
      "number": "541-555-0987",
      "extension": 5,
      "is_primary": false
    },
    {
      "label": "cell",
      "country_code": "+1",
      "number": "541-555-0573",
      "extension": null,
      "is_primary": true
    }
  ]
}
{
  "current_page": 1,
  "per_page": 100,
  "total_entries": 3,
  "phone_numbers": [
    {
      "id": 294655,
      "url": "/clients/168019/phone_numbers/294655",
      "country_code": "1",
      "raw_number": "5550123",
      "number": "541-555-0123",
      "extension": null,
      "label": "home",
      "updated_at": "2017-12-15T00:12:21Z"
    },
    {
      "id": 294656,
      "url": "/clients/168019/phone_numbers/294656",
      "country_code": "1",
      "raw_number": "5550987",
      "number": "541-555-0987",
      "extension": "5",
      "label": "work",
      "updated_at": "2017-12-15T00:12:21Z"
    },
    {
      "id": 294657,
      "url": "/clients/168019/phone_numbers/294657",
      "country_code": "1",
      "raw_number": "5550573",
      "number": "541-555-0573",
      "extension": null,
      "label": "cell",
      "updated_at": "2017-12-15T00:12:21Z"
    }
  ]
}