Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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

Info

Starting 3/23/2015 You can send number as area_code and number e.g. {:area_code => "212", :number => "5551212" }. the old way {number => "(212) 555 1212"} is still supported, but will be depreciated in the new api release.


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 
area_codeThe area codeStringOptionalBody4 characters
numberThe phone numberStringRequiredBody
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.

Code Block
languagejs
themeRDark
linenumberstrue
{
  "phone_numbers": [
    {
      "label": "home",
      "country_code": "+1",
      "area_code": "541",
      "number": "555-0123",
      "extension": null,
      "is_primary": false
    }
  ]
}



 


Code Block
languageruby
themeConfluence
{
  "current_page": 1,
  "per_page": 100,
  "total_entries": 1,
  "phone_numbers": [
    {
      "id": 294655,
      "url": "/clients/168019/phone_numbers/294655",
      "country_code": "1",
      "area_code": null,
      "raw_number": "5550123",
      "number": "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.

Code Block
languagejs
themeRDark
linenumberstrue
{
  "phone_numbers": [
    {
      "label": "home",
      "country_code": "+1",
      "area_code": "541",
      "number": "555-0123",
      "extension": null,
      "is_primary": false
    },
    {
      "label": "work",
      "country_code": "+1",
      "area_code": "541",
      "number": "555-0987",
      "extension": 5,
      "is_primary": false
    },
    {
      "label": "cell",
      "country_code": "+1",
      "area_code": "541",
      "number": "555-0573",
      "extension": null,
      "is_primary": true
    }
  ]
}
 




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


...