About

The API allows you to specify the configuration of your phone numbers such as routing, recording and attribution options. Numbers can be found using a Find Available Numbers request and acquired with a Purchase Numbers request.

Resource URI

Numbers can be configured with multiple optional parameters.

POST

/v2/Numbers/[Number]

Request

URI Parameters

ParameterTypeDescription
Number
(E.164 Format excluding +)
stringThe number to configure. Exclude + in URLs only.

Resource Parameters

ParameterTypeDescription
Friendly
(Optional)
stringProvide a friendly name for this number. This can be useful for internal referencing.
AddressSid
(Optional)
stringChange the address for this number.
Attribution_Source
(Optional)
stringAttribute calls to this number with a unique source for analytical purposes.
Attribution_Medium
(Optional)
stringAttribute calls to this number with a particular medium for analytical purposes.
Attribution_Campaign
(Optional)
stringAttribute calls to this number with a campaign for analytical purposes.
Attribution_Content
(Optional)
stringAttribute calls to this number with certain content for analytical purposes.

Voice Number Parameters

ParameterTypeDescription
RoutingMethod
(Optional)
stringThe current routing method of the number. May be:
Endpoint : Calls will be routed to the specified EndpointNumber.
EndpointNumber
(E.164 Format)
stringThe endpoint where calls will be routed.
Recording
(Optional)
stringThe call recording option. May be:
Off : Calls to this number will not be recorded.
Call : Entire calls to this number will be recorded.

SMS Number Parameters

ParameterTypeDescription
SendSmsFrom
(Optional)
stringIf a received SMS should be forwarded as SMS, the sender of the forwarded SMS
SendSmsTo
(Optional)
stringIf a received SMS should be forwarded as SMS, the receiver of the forwarded SMS
SendEmailFrom
(Optional)
stringIf a received SMS should be forwarded as e-mail, the sender of the e-mail.
SendEmailTo
(Optional)
stringIf a received SMS should be forwarded as e-mail, the receiver of the e-mail.
WebHookUrl
(Optional)
stringIf a received SMS should cause a webhook to be invoked, the URL of the webhook.
WebHookMethod
(Optional)
stringIf a received SMS should cause a webhook to be invoked, the HTTP method used. May be:
GET : The webhook URL will receive a HTTP GET request.
POST : The webhook URL will receive a HTTP POST request.
DeliveryReceiptWebHookUrl
(Optional)
stringIf a SMS delivery receipt should cause a webhook to be invoked, the URL of the webhook.
DeliveryReceiptWebHookMethod
(Optional)
stringIf a SMS delivery receipt should cause a webhook to be invoked, the HTTP method used. May be:
GET : The webhook URL will receive a HTTP GET request.
POST : The webhook URL will receive a HTTP POST request.

Response

200 – OK

Our service will respond to every configuration request with JSON formatted data. Requests to configure numbers will return the number that was configured along with its current configuration.

Response Parameters

ParameterTypeDescription
Number
(E.164 Format)
stringThe number that was configured.
AccountSidstringThe account secure identifier the number is associated with.
PropertySidstringThe property secure identifier the number is associated with.
FriendlystringAssociated friendly name with this number. This may be used for internal referencing.
AddressSidstringAddress set for this number.
Attribution_SourcestringCalls to this number will be attributed to this source.
Attribution_MediumstringCalls to this number will be attributed to this medium.
Attribution_CampaignstringCalls to this number will be attributed to this campaign.
Attribution_ContentstringCalls to this number will be attributed to this content.

Voice Number Parameters

ParameterTypeDescription
Routing Method
(Optional)
stringThe current routing method of the number. May be:
Endpoint : Calls will be routed to the specified EndpointNumber.
EndpointNumber
(E.164 Format)
stringThe endpoint where calls will be routed.
Recording
(Optional)
stringThe call recording option. May be:
Off : Calls to this number will not be recorded.
Call : Entire calls to this number will be recorded.

SMS Number Parameters

ParameterTypeDescription
SendSmsFrom
(Optional)
stringIf a received SMS should be forwarded as SMS, the sender of the forwarded SMS
SendSmsTo
(Optional)
stringIf a received SMS should be forwarded as e-mail, the receiver of the forwarded SMS
SendEmailFrom
(Optional)
stringIf a received SMS should be forwarded as e-mail, the sender of the e-mail.
SendEmailTo
(Optional)
stringIf a received SMS should be forwarded as e-mail, the receiver of the e-mail.
WebHookUrl
(Optional)
stringIf a received SMS should cause a webhook to be invoked, the URL of the webhook.
WebHookMethod
(Optional)
stringIf a received SMS should cause a webhook to be invoked, the HTTP method used. May be:
GET : The webhook URL will receive a HTTP GET request.
POST : The webhook URL will receive a HTTP POST request.
DeliveryReceiptWebHookUrl
(Optional)
stringIf a SMS delivery receipt should cause a webhook to be invoked, the URL of the webhook.
DeliveryReceiptWebHookMethod
(Optional)
stringIf a SMS delivery receipt should cause a webhook to be invoked, the HTTP method used. May be:
GET : The webhook URL will receive a HTTP GET request.
POST : The webhook URL will receive a HTTP POST request.

400 – Error

For error codes and messages, please refer here.