Twilio: Incoming phone number schemas
1 Twilio schema with complete fields and constraints.
โ Incoming phone number operations ยท All schemas
Purchase a phone-number for the account โ response body
| Field | Type | Presence | Description and constraints |
|---|---|---|---|
$ | object | Root | |
account_sid | JSON | Optional | |
account_sid (anyOf 1) | string | Alternative | The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created this IncomingPhoneNumber resource. Maximum length: 34 Minimum length: 34 Pattern: ^AC[0-9a-fA-F]{32}$ |
account_sid (anyOf 2) | null | Alternative | |
address_requirements | string | Optional | Whether the phone number requires an [Address](https://www.twilio.com/docs/usage/api/address) registered with Twilio. Can be: `none`, `any`, `local`, or `foreign`. Known values: none, any, local, foreign |
address_sid | JSON | Optional | |
address_sid (anyOf 1) | string | Alternative | The SID of the Address resource associated with the phone number. Maximum length: 34 Minimum length: 34 Pattern: ^AD[0-9a-fA-F]{32}$ |
address_sid (anyOf 2) | null | Alternative | |
api_version | JSON | Optional | |
api_version (anyOf 1) | string | Alternative | The API version used to start a new TwiML session. |
api_version (anyOf 2) | null | Alternative | |
beta | JSON | Optional | |
beta (anyOf 1) | boolean | Alternative | Whether the phone number is new to the Twilio platform. Can be: `true` or `false`. |
beta (anyOf 2) | null | Alternative | |
bundle_sid | JSON | Optional | |
bundle_sid (anyOf 1) | string | Alternative | The SID of the Bundle resource that you associate with the phone number. Some regions require a Bundle to meet local Regulations. Maximum length: 34 Minimum length: 34 Pattern: ^BU[0-9a-fA-F]{32}$ |
bundle_sid (anyOf 2) | null | Alternative | |
capabilities | JSON | Optional | |
capabilities (anyOf 1) | object | Alternative | The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are `Voice`, `SMS`, and `MMS` and each capability can be: `true` or `false`. Format: phone-number-capabilities |
capabilities (anyOf 1).fax | boolean | Optional | |
capabilities (anyOf 1).mms | boolean | Optional | |
capabilities (anyOf 1).sms | boolean | Optional | |
capabilities (anyOf 1).voice | boolean | Optional | |
capabilities (anyOf 2) | null | Alternative | |
date_created | JSON | Optional | |
date_created (anyOf 1) | string | Alternative | The date and time in GMT that the resource was created specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Format: date-time-rfc-2822 |
date_created (anyOf 2) | null | Alternative | |
date_updated | JSON | Optional | |
date_updated (anyOf 1) | string | Alternative | The date and time in GMT that the resource was last updated specified in [RFC 2822](https://www.ietf.org/rfc/rfc2822.txt) format. Format: date-time-rfc-2822 |
date_updated (anyOf 2) | null | Alternative | |
emergency_address_sid | JSON | Optional | |
emergency_address_sid (anyOf 1) | string | Alternative | The SID of the emergency address configuration that we use for emergency calling from this phone number. Maximum length: 34 Minimum length: 34 Pattern: ^AD[0-9a-fA-F]{32}$ |
emergency_address_sid (anyOf 2) | null | Alternative | |
emergency_address_status | string | Optional | The status of address registration with emergency services. A registered emergency address will be used during handling of emergency calls from this number. Known values: registered, unregistered, pending-registration, registration-failure, pending-unregistration, unregistration-failure |
emergency_status | string | Optional | The parameter displays if emergency calling is enabled for this number. Active numbers may place emergency calls by dialing valid emergency numbers for the country. Known values: Active, Inactive |
friendly_name | JSON | Optional | |
friendly_name (anyOf 1) | string | Alternative | The string that you assigned to describe the resource. |
friendly_name (anyOf 2) | null | Alternative | |
identity_sid | JSON | Optional | |
identity_sid (anyOf 1) | string | Alternative | The SID of the Identity resource that we associate with the phone number. Some regions require an Identity to meet local regulations. Maximum length: 34 Minimum length: 34 Pattern: ^RI[0-9a-fA-F]{32}$ |
identity_sid (anyOf 2) | null | Alternative | |
origin | JSON | Optional | |
origin (anyOf 1) | string | Alternative | The phone number's origin. `twilio` identifies Twilio-owned phone numbers and `hosted` identifies hosted phone numbers. |
origin (anyOf 2) | null | Alternative | |
phone_number | JSON | Optional | |
phone_number (anyOf 1) | string | Alternative | The phone number in [E.164](https://www.twilio.com/docs/glossary/what-e164) format, which consists of a + followed by the country code and subscriber number. Format: phone-number |
phone_number (anyOf 2) | null | Alternative | |
sid | JSON | Optional | |
sid (anyOf 1) | string | Alternative | The unique string that that we created to identify this IncomingPhoneNumber resource. Maximum length: 34 Minimum length: 34 Pattern: ^PN[0-9a-fA-F]{32}$ |
sid (anyOf 2) | null | Alternative | |
sms_application_sid | JSON | Optional | The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. |
sms_application_sid (anyOf 1) | JSON | Alternative | |
sms_application_sid (anyOf 1) (anyOf 1) | string | Alternative | The SID of the application that handles SMS messages sent to the phone number. If an `sms_application_sid` is present, we ignore all `sms_*_url` values and use those of the application. Maximum length: 34 Minimum length: 34 Pattern: ^AP[0-9a-fA-F]{32}$ |
sms_application_sid (anyOf 1) (anyOf 2) | null | Alternative | |
sms_application_sid (anyOf 2) | string | Alternative | Maximum length: 0 |
sms_fallback_method | JSON | Optional | |
sms_fallback_method (anyOf 1) | string | Alternative | The HTTP method we use to call `sms_fallback_url`. Can be: `GET` or `POST`. Known values: GET, POST Format: http-method |
sms_fallback_method (anyOf 2) | null | Alternative | |
sms_fallback_url | JSON | Optional | |
sms_fallback_url (anyOf 1) | string | Alternative | The URL that we call when an error occurs while retrieving or executing the TwiML from `sms_url`. Format: uri |
sms_fallback_url (anyOf 2) | null | Alternative | |
sms_method | JSON | Optional | |
sms_method (anyOf 1) | string | Alternative | The HTTP method we use to call `sms_url`. Can be: `GET` or `POST`. Known values: GET, POST Format: http-method |
sms_method (anyOf 2) | null | Alternative | |
sms_url | JSON | Optional | |
sms_url (anyOf 1) | string | Alternative | The URL we call when the phone number receives an incoming SMS message. Format: uri |
sms_url (anyOf 2) | null | Alternative | |
status | JSON | Optional | |
status (anyOf 1) | string | Alternative | |
status (anyOf 2) | null | Alternative | |
status_callback | JSON | Optional | |
status_callback (anyOf 1) | string | Alternative | The URL we call using the `status_callback_method` to send status information to your application. Format: uri |
status_callback (anyOf 2) | null | Alternative | |
status_callback_method | JSON | Optional | |
status_callback_method (anyOf 1) | string | Alternative | The HTTP method we use to call `status_callback`. Can be: `GET` or `POST`. Known values: GET, POST Format: http-method |
status_callback_method (anyOf 2) | null | Alternative | |
trunk_sid | JSON | Optional | |
trunk_sid (anyOf 1) | string | Alternative | The SID of the Trunk that handles calls to the phone number. If a `trunk_sid` is present, we ignore all of the voice urls and voice applications and use those set on the Trunk. Setting a `trunk_sid` will automatically delete your `voice_application_sid` and vice versa. Maximum length: 34 Minimum length: 34 Pattern: ^TK[0-9a-fA-F]{32}$ |
trunk_sid (anyOf 2) | null | Alternative | |
type | JSON | Optional | |
type (anyOf 1) | string | Alternative | The phone number type. |
type (anyOf 2) | null | Alternative | |
uri | JSON | Optional | |
uri (anyOf 1) | string | Alternative | The URI of the resource, relative to `https://api.twilio.com`. |
uri (anyOf 2) | null | Alternative | |
voice_application_sid | JSON | Optional | The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. |
voice_application_sid (anyOf 1) | JSON | Alternative | |
voice_application_sid (anyOf 1) (anyOf 1) | string | Alternative | The SID of the application that handles calls to the phone number. If a `voice_application_sid` is present, we ignore all of the voice urls and use those set on the application. Setting a `voice_application_sid` will automatically delete your `trunk_sid` and vice versa. Maximum length: 34 Minimum length: 34 Pattern: ^AP[0-9a-fA-F]{32}$ |
voice_application_sid (anyOf 1) (anyOf 2) | null | Alternative | |
voice_application_sid (anyOf 2) | string | Alternative | Maximum length: 0 |
voice_caller_id_lookup | JSON | Optional | |
voice_caller_id_lookup (anyOf 1) | boolean | Alternative | Whether we look up the caller's caller-ID name from the CNAM database ($0.01 per look up). Can be: `true` or `false`. |
voice_caller_id_lookup (anyOf 2) | null | Alternative | |
voice_fallback_method | JSON | Optional | |
voice_fallback_method (anyOf 1) | string | Alternative | The HTTP method we use to call `voice_fallback_url`. Can be: `GET` or `POST`. Known values: GET, POST Format: http-method |
voice_fallback_method (anyOf 2) | null | Alternative | |
voice_fallback_url | JSON | Optional | |
voice_fallback_url (anyOf 1) | string | Alternative | The URL that we call when an error occurs retrieving or executing the TwiML requested by `url`. Format: uri |
voice_fallback_url (anyOf 2) | null | Alternative | |
voice_method | JSON | Optional | |
voice_method (anyOf 1) | string | Alternative | The HTTP method we use to call `voice_url`. Can be: `GET` or `POST`. Known values: GET, POST Format: http-method |
voice_method (anyOf 2) | null | Alternative | |
voice_receive_mode | string | Optional | Known values: voice, fax |
voice_url | JSON | Optional | |
voice_url (anyOf 1) | string | Alternative | The URL we call when the phone number receives a call. The `voice_url` will not be used if a `voice_application_sid` or a `trunk_sid` is set. Format: uri |
voice_url (anyOf 2) | null | Alternative |