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

Parameter Type Description
Number
(E.164 Format excluding +)
string The number to configure. Exclude + in URLs only.

Resource Parameters

Parameter Type Description
Friendly
(Optional)
string Provide a friendly name for this number. This can be useful for internal referencing.
AddressSid
(Optional)
string Change the address for this number.
Attribution_Source
(Optional)
string Attribute calls to this number with a unique source for analytical purposes.
Attribution_Medium
(Optional)
string Attribute calls to this number with a particular medium for analytical purposes.
Attribution_Campaign
(Optional)
string Attribute calls to this number with a campaign for analytical purposes.
Attribution_Content
(Optional)
string Attribute calls to this number with certain content for analytical purposes.

Voice Number Parameters

Parameter Type Description
RoutingMethod
(Optional)
string The current routing method of the number. May be:
Endpoint : Calls will be routed to the specified EndpointNumber.
Flow : Calls will be routed to the specified Flow ConfigID. This can be found using a Get Flows request.
EndpointNumber
(E.164 Format)
string The endpoint where calls will be routed.
Flow string The flow where calls will be routed.
Recording
(Optional)
string The 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

Parameter Type Description
SendSmsFrom
(Optional)
string If a received SMS should be forwarded as SMS, the sender of the forwarded SMS
SendSmsTo
(Optional)
string If a received SMS should be forwarded as SMS, the receiver of the forwarded SMS
SendEmailFrom
(Optional)
string If a received SMS should be forwarded as e-mail, the sender of the e-mail.
SendEmailTo
(Optional)
string If a received SMS should be forwarded as e-mail, the receiver of the e-mail.
WebHookUrl
(Optional)
string If a received SMS should cause a webhook to be invoked, the URL of the webhook.
WebHookMethod
(Optional)
string If 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)
string If a SMS delivery receipt should cause a webhook to be invoked, the URL of the webhook.
DeliveryReceiptWebHookMethod
(Optional)
string If 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

Parameter Type Description
Number
(E.164 Format)
string The number that was configured.
AccountSid string The account secure identifier the number is associated with.
PropertySid string The property secure identifier the number is associated with.
Friendly string Associated friendly name with this number. This may be used for internal referencing.
AddressSid string Address set for this number.
Attribution_Source string Calls to this number will be attributed to this source.
Attribution_Medium string Calls to this number will be attributed to this medium.
Attribution_Campaign string Calls to this number will be attributed to this campaign.
Attribution_Content string Calls to this number will be attributed to this content.

Voice Number Parameters

Parameter Type Description
Routing Method
(Optional)
string The current routing method of the number. May be:
Endpoint: Calls will be routed to the specified EndpointNumber.
Flow : Calls will be routed to the specified Flow ConfigID. This can be found using a Get Flows request.
EndpointNumber
(E.164 Format)
string The endpoint where calls will be routed.
Flow string The flow where calls will be routed.
Recording
(Optional)
string The 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

Parameter Type Description
SendSmsFrom
(Optional)
string If a received SMS should be forwarded as SMS, the sender of the forwarded SMS
SendSmsTo
(Optional)
string If a received SMS should be forwarded as e-mail, the receiver of the forwarded SMS
SendEmailFrom
(Optional)
string If a received SMS should be forwarded as e-mail, the sender of the e-mail.
SendEmailTo
(Optional)
string If a received SMS should be forwarded as e-mail, the receiver of the e-mail.
WebHookUrl
(Optional)
string If a received SMS should cause a webhook to be invoked, the URL of the webhook.
WebHookMethod
(Optional)
string If 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)
string If a SMS delivery receipt should cause a webhook to be invoked, the URL of the webhook.
DeliveryReceiptWebHookMethod
(Optional)
string If 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 to the REST API Error Codes page.