Inbound Processing Region API - PhoneNumber
In the context of the Inbound Processing Region API, a PhoneNumber
resource represents the routing configuration for a particular IncomingPhoneNumber.
By adjusting the value of the voice_region
property, you can control which Twilio Region will process and store data related to inbound calls for the phone number.
Warning
Changes to this resource may take up to 5 minutes to take effect.
Resource properties
phone_number
type: string
The phone number in E.164 format
url
type: string<uri>
The absolute URL of the resource.
sid
type: SID<QQ>
A 34 character string that uniquely identifies the Inbound Processing Region assignments for this phone number.
Pattern:
^QQ[0-9a-fA-F]{32}$
account_sid
type: SID<AC>
The unique SID identifier of the Account.
Pattern:
^AC[0-9a-fA-F]{32}$
friendly_name
type: string
A human readable description of the Inbound Processing Region assignments for this phone number, up to 64 characters.
voice_region
type: string
The Inbound Processing Region used for this phone number for voice.
date_created
type: string<date-time>
The date that this phone number was assigned an Inbound Processing Region, given in ISO 8601 format.
date_updated
type: string<date-time>
The date that the Inbound Processing Region was updated for this phone number, given in ISO 8601 format.
GET https://routes.twilio.com/v2/PhoneNumbers/{PhoneNumber}
URI parameters
PhoneNumber
type: string
The phone number in E.164 format
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.routes.v2.phoneNumbers('+18001234567')
_10 .then(phone_number => console.log(phone_number.friendlyName));
_10 "phone_number": "+18001234567",
_10 "url": "https://routes.twilio.com/v2/PhoneNumbers/+18001234567",
_10 "sid": "QQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "friendly_name": "friendly_name",
_10 "voice_region": "au1",
_10 "date_created": "2015-07-30T20:00:00Z",
_10 "date_updated": "2015-07-30T20:00:00Z"
POST https://routes.twilio.com/v2/PhoneNumbers/{PhoneNumber}
URI parameters
PhoneNumber
type: string
The phone number in E.164 format
Request body parameters
VoiceRegion
type: string
The Inbound Processing Region used for this phone number for voice
FriendlyName
type: string
A human readable description of this resource, up to 64 characters.
_10// Download the helper library from https://www.twilio.com/docs/node/install
_10// Find your Account SID and Auth Token at twilio.com/console
_10// and set the environment variables. See http://twil.io/secure
_10const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10const authToken = process.env.TWILIO_AUTH_TOKEN;
_10const client = require('twilio')(accountSid, authToken);
_10client.routes.v2.phoneNumbers('+18001234567')
_10 .update({voiceRegion: 'au1'})
_10 .then(phone_number => console.log(phone_number.voiceRegion));
_10 "phone_number": "+18001234567",
_10 "url": "https://routes.twilio.com/v2/PhoneNumbers/+18001234567",
_10 "sid": "QQXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_10 "friendly_name": "friendly_name",
_10 "voice_region": "au1",
_10 "date_created": "2015-07-30T20:00:00Z",
_10 "date_updated": "2015-07-30T20:00:00Z"