Clients / Phone Numbers / Create
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 | Location | Limitations |
---|---|---|---|---|---|
client_id | The ID of the specific Client | Integer | Required | URI | |
label | A label to associate with this phone number | String | Optional | Body | 20 characters max |
| The country calling code | String | Optional | Body | |
number | The phone number, should include area code | String | Required | Body | |
extension | Specific extension | String | Optional | Body | |
is_primary | Indicates if this is the primary phone number for this Client/ | Boolean | Optional | Body |
Examples
Request | Response |
---|---|
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" } ] } |