Skip to contentSkip to navigationSkip to topbar
On this page

Active Numbers Resource


(warning)

Warning

Active Numbers API is currently in closed private Developer Preview. Please use the generally available Incoming Phone Numbers API if you do not have access.

The Global Phone Numbers Catalog - Active Numbers resource has the same search and filtering functions as Available Numbers. You can filter based on the attributes of a phone number and see detailed attributes of your current inventory. Some PhoneNumber instances may be null due to missing data. We are working towards a 100% inventory backed resource.


Resource Properties

instance-properties page anchor

Basic Capability Properties

basic-capability-properties page anchor

The table below states basic properties of the phone number that associate the number to a unique group within Twilio's inventory system.

PropertyDescription
PhoneNumberThe phone number, in E.164(link takes you to an external page) (i.e. "+1") format.
FriendlyNameA human-readable descriptive text for this resource, up to 64 characters long. By default, the FriendlyName is a nicely formatted version of the phone number.
TypeThe type of phone number (i.e., local, mobile, toll-free, short code, etc.).
LifecycleThe lifecycle the number is in (i.e., developer-preview, beta, generally-available, exhausted).
StatusCallbackThe URL that Twilio will request to pass status parameters (such as call ended) to your application.
StatusCallbackMethodThe HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

Voice Capability Properties

voice-capability-properties page anchor

Voice calling is provided by utilizing the Public Switch Telephone Network (PSTN)(link takes you to an external page), the aggregate of the world's circuit-switched telephone networks that are operated by national, regional, or local telephony operators, providing infrastructure and services for public telecommunication.

PropertyDescription
Capabilities.Voice.InboundConnectivityIndicates whether a number has inbound voice connectivity in to Twilio.
Capabilities.Voice.OutboundConnectivityIndicates whether a number has outbound voice connectivity out of Twilio.
Capabilities.Voice.E911Emergency 911(link takes you to an external page) connectivity capable number.
Capabilities.Voice.FaxFax(link takes you to an external page) capable number.
Capabilities.Voice.SipTrunkingSip Trunking(link takes you to an external page) capable number.
Capabilities.Voice.CallsPerSecondInteger stating how many calls can be initiated per second. Please refer to Twilio's CPS Support article(link takes you to an external page) for more information.
Capabilities.Voice.ConcurrentCallsLimitInteger stating how many calls can be active at one time.
Capabilities.Voice.InboundCalledDtmfDual-Tone Multi Frequency(link takes you to an external page) with inbound called party.
Capabilities.Voice.InboundCallerDtmfDual-Tone Multi Frequency(link takes you to an external page) with inbound caller party.
Capabilities.Voice.InboundCallerIdPreservationInbound voice Caller ID (+E.164 format)(link takes you to an external page) preservation of a number. Can be - International, Domestic, or None.
Capabilities.Voice.InboundReachabilityInbound Voice reachability of a number. Can be - Domestic, Foreign, or Global.
Capabilities.Voice.LongRecordLengthThe length in seconds that a number can record a voicemail.

Sms Capability Properties

sms-capability-properties page anchor

Short Messaging Service (SMS)(link takes you to an external page) is a text messaging service component of most telephone, World Wide Web, and mobile telephony systems.

PropertyDescription
Capabilities.Sms.InboundConnectivityIndicates whether a number has inbound sms connectivity in to Twilio.
Capabilities.Sms.OutboundConnectivityIndicates whether a number has outbound sms connectivity out of Twilio.
Capabilities.Sms.Gsm7GSM-7 is a character encoding standard which packs the most commonly used letters and symbols in many languages into 7 bits each for usage on GSM networks. See What is GSM-7 Character Encoding(link takes you to an external page).
Capabilities.Sms.Ucs2UCS-2 is a character encoding standard in which characters are represented by a fixed-length 16 bits (2 bytes). See What is UCS-2 Character Encoding?(link takes you to an external page).
Capabilities.Sms.Gsm7ConcatenationConcatenated short message service (or concatenated SMS)(link takes you to an external page) is used overcome the limitation on the number of characters that can be sent in a single SMS text message transmission (which is usually 160), and split the sms into smaller messages by the sending device and recombined at the receiving end.
Capabilities.Sms.Ucs2ConcatenationConcatenated short message service (or concatenated SMS)(link takes you to an external page) is used overcome the limitation on the number of characters that can be sent in a single SMS text message transmission (which is usually 160), and split the sms into smaller messages by the sending device and recombined at the receiving end.
Capabilities.Sms.InboundSenderIdPreservationInbound sms Sender ID (+E.164 format)(link takes you to an external page) preservation of a number. Can be - International, Domestic, or None.
Capabilities.Sms.InboundReachabilityInbound SMS reachability of a number. Can be - Domestic, Foreign, or Global.
Capabilities.Sms.InboundMpsInteger showing the SMS inbound message per second limit. Please refer to Twilio's MPS Support article(link takes you to an external page) for more information.

Mms Capability Properties

mms-capability-properties page anchor

Multimedia Messaging Service (MMS)(link takes you to an external page) is a standard way to send messages that include multimedia content to and from a mobile phone over a cellular network.

PropertyDescription
Capabilities.Mms.InboundconnectivityIndicates whether a number has inbound MMS connectivity into Twilio.
Capabilities.Mms.OutboundconnectivityIndicates whether a number has outbound MMS connectivity into Twilio.
Capabilities.Mms.InboundReachabilityInbound MMS reachability of a number. Can be - Domestic, Foreign, or Global.
Capabilities.Mms.InboundMpsInteger showing the MMS inbound message per second limit. Please refer to Twilio's MPS Support article(link takes you to an external page) for more information.

Regulations that pertain to this specific number that may deal with Addresses and/or Identities to be required and completed as a pre-request before purchasing.

PropertyDescription
Regulatory.AddressRequirementsThis indicates whether the phone number requires you or your customer to have an Address(link takes you to an external page) registered with Twilio. Possible values are listed below.

Address Requirement Values

address-requirement-values page anchor

The following are the possible values for the address_required property.

StatusDescription
noneAn Address(link takes you to an external page) is not required for this phone number.
anyYour account must have an Address(link takes you to an external page), but it can be anywhere in the world.
localYour account must have an Address(link takes you to an external page) within the phone number's country.
foreignYour account must have an Address(link takes you to an external page) outside the phone number's country.

A phone number's specific geography associated with a number. Some numbers are country level only, and others have specific latitude and longitude associated with them. To understand more, please visit List of Country Codes(link takes you to an external page).

PropertyDescription
Geography.IsoCountryThe ISO country code(link takes you to an external page) of this phone number.
Geography.LataThe LATA(link takes you to an external page) of this phone number. Only available for countries in the North American Numbering Plan (NANPA)(link takes you to an external page).
Geography.RateCenterThe rate center(link takes you to an external page) of this phone number. Only available for countries in the North American Numbering Plan (NANPA)(link takes you to an external page).
Geography.LatitudeThe latitude coordinate of this phone number.
Geography.LongitudeThe longitude coordinate of this phone number.
Geography.RegionThe two-letter state or province abbreviation of this phone number.
Geography.LocalityThe locality/city of this phone number.
Geography.PostalCodeThe postal (zip) code of this phone number.

Voice Configuration Properties

voice-configuration-properties page anchor

A number's voice configuration for the capabilities enabled. These attributes are mutable and can be changed based on differing operations.

PropertyDescription
Configurations.Voice.ApplicationSidThe 34 character sid of the voice application(link takes you to an external page) Twilio should use to handle Voice sent to this number. If an VoiceApplicationSid is present, Twilio will ignore all of the VoiceUrls above and use those set on the application.
Configurations.Voice.TrunkSidThe 34 character sid of the Trunk Twilio should use to handle phone calls to this number. If a TrunkSid is present, Twilio will ignore all of the voice urls and voice applications above and use those set on the Trunk. Setting a TrunkSid will automatically delete your VoiceApplicationSid and vice versa.
Configurations.Voice.EmergencyStatusStatus determining whether the number is enabled for emergency calling.
Configurations.Voice.EmergencyAddressSidEmergencyAddress configuration to leverage emergency calling.
Configurations.Voice.ReceiveModeWhether the phone number is configured to receive voice or fax calls. Either voice or fax.
Configurations.Voice.UrlThe URL Twilio will request when this phone number receives a call. The VoiceURL will no longer be used if a VoiceApplicationSid or a TrunkSid is set.
Configurations.Voice.MethodThe HTTP method Twilio will use when requesting the above Url. Either GET or POST. The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url.
Configurations.Voice.FallbackUrlThe URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url.
Configurations.Voice.FallbackMethodThe HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.
Configurations.Voice.CallerIdLookupDo a lookup of a caller's name from the CNAM database and post it to your app. Either true or false.

Sms Configuration Properties

sms-configuration-properties page anchor

A number's sms configuration for the capabilities enabled. These attributes are mutable and can be changed based on differing operations.

PropertyDescription
Configurations.Sms.ApplicationSidThe 34 character sid of the application(link takes you to an external page) Twilio should use to handle SMSs sent to this number. If an SmsApplicationSid is present, Twilio will ignore all of the SMS urls above and use those set on the application.
Configurations.Sms.UrlThe URL Twilio will request when this phone number receives a message. The SmsUrl will no longer be used if an SmsApplicationSid is set.
Configurations.Sms.MethodThe HTTP method Twilio will use when making requests to the SmsUrl. Either GET or POST.
Configurations.Sms.FallbackUrlThe URL that Twilio will request if an error occurs retrieving or executing the TwiML from SmsUrl. The HTTP method Twilio will use when requesting the above URL. Either GET or POST.
Configurations.Sms.FallbackMethodThe HTTP method Twilio will use when requesting the above URL. Either GET or POST.
GET ActiveNumbers InstanceLink to code sample: GET ActiveNumbers Instance
1
$ curl -G https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy \
2
-u '<ACCOUNT_SID:AUTH_TOKEN>'

Output

1
{
2
"items": [
3
{
4
"phone_number": "+18559728742",
5
"url": "https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
6
"capabilities": {
7
"voice": {
8
"inbound_connectivity": true,
9
"outbound_connectivity": true,
10
"e911": false,
11
"fax": true,
12
"calls_per_second": 20,
13
"concurrent_calls_limit": 40,
14
"long_record_length": 30,
15
"inbound_called_dtmf": true,
16
"inbound_caller_dtmf": true,
17
"sip_trunking": true,
18
"inbound_caller_id_preservation": "international",
19
"inbound_reachability": "global"
20
},
21
"sms": {
22
"inbound_connectivity": true,
23
"outbound_connectivity": true,
24
"gsm7": true,
25
"ucs2": true,
26
"inbound_sender_id_preservation": "international",
27
"inbound_reachability": "global",
28
"inbound_mps": -1
29
},
30
"mms": null
31
},
32
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
33
"sid": "PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
34
"regulatory": {
35
"address_requirements": "none"
36
},
37
"configuration": {
38
"friendly_name": "(855) 972-8742",
39
"status_callback_url": "",
40
"status_callback_method": "POST",
41
"voice": {
42
"url": "",
43
"method": "POST",
44
"fallback_url": null,
45
"fallback_method": "POST",
46
"application_sid": null,
47
"trunk_sid": null,
48
"emergency_address_sid": null,
49
"emergency_status": "Inactive",
50
"caller_id_lookup": false
51
},
52
"sms": {
53
"url": "",
54
"method": "POST",
55
"fallback_url": "",
56
"fallback_method": "POST",
57
"application_sid": ""
58
}
59
},
60
"type": "tollfree",
61
"lifecycle": "generally-available",
62
"geography": {
63
"iso_country": "US",
64
"lata": null,
65
"rate_center": null,
66
"latitude": null,
67
"longitude": null,
68
"region": null,
69
"locality": null,
70
"postal_code": null
71
}
72
}
73
],
74
"meta": {
75
"page": 0,
76
"page_size": 50,
77
"first_page_url": "https://preview.twilio.com/Numbers/ActiveNumbers&PageSize=50&Page=0",
78
"previous_page_url": null,
79
"url": "https://preview.twilio.com/Numbers/ActiveNumbers&PageSize=50&Page=0",
80
"next_page_url": null,
81
"key": "items"
82
}
83
}

ActiveNumbers Instance Resource

instance page anchor

An ActiveNumbers instance represents a Twilio phone number purchased from Twilio, ported to Twilio, or hosted on Twilio in your account.

1
https://preview.twilio.com/Numbers/ActiveNumbers/{ActiveNumberSid}
2

Look up the capabilities on a specific number using the PhoneNumberSid in the URI.

1
$ curl -XPOST https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy \
2
-d "Configurations.Voice.Url = https://my-voice-url.com" \
3
-d "Configurations.Sms.Url = https://my-sms-url.com" \
4
-u '<ACCOUNT_SID:AUTH_TOKEN>'

Output

1
{
2
"phone_number": "+18559728742",
3
"url": "https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
4
"capabilities": {
5
"voice": {
6
"inbound_connectivity": true,
7
"outbound_connectivity": true,
8
"e911": false,
9
"fax": true,
10
"calls_per_second": 20,
11
"concurrent_calls_limit": 40,
12
"long_record_length": 30,
13
"inbound_called_dtmf": true,
14
"inbound_caller_dtmf": true,
15
"sip_trunking": true,
16
"inbound_caller_id_preservation": "international",
17
"inbound_reachability": "global"
18
},
19
"sms": {
20
"inbound_connectivity": true,
21
"outbound_connectivity": true,
22
"gsm7": true,
23
"ucs2": true,
24
"inbound_sender_id_preservation": "international",
25
"inbound_reachability": "global",
26
"inbound_mps": -1
27
},
28
"mms": null
29
},
30
"account_sid": "ACxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
31
"sid": "PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy",
32
"regulatory": {
33
"address_requirements": "none"
34
},
35
"configuration": {
36
"friendly_name": "(855) 972-8742",
37
"status_callback_url": "",
38
"status_callback_method": "POST",
39
"voice": {
40
"url": "https://demo.twilio.com/welcome/voice/",
41
"method": "POST",
42
"fallback_url": null,
43
"fallback_method": "POST",
44
"application_sid": null,
45
"trunk_sid": null,
46
"emergency_address_sid": null,
47
"emergency_status": "Inactive",
48
"caller_id_lookup": false
49
},
50
"sms": {
51
"url": "",
52
"method": "POST",
53
"fallback_url": "",
54
"fallback_method": "POST",
55
"application_sid": ""
56
}
57
},
58
"type": "tollfree",
59
"lifecycle": "generally-available",
60
"geography": {
61
"iso_country": "US",
62
"lata": null,
63
"rate_center": null,
64
"latitude": null,
65
"longitude": null,
66
"region": null,
67
"locality": null,
68
"postal_code": null
69
}
70
}

Configure your number using the post method on the phone number instance with the possible optional parameters.

Basic Configuration Properties

basic-configuration-properties page anchor
PropertyDescription
Configurations.StatusCallbackThe URL that Twilio will request to pass status parameters (such as call ended) to your application.
Configurations.StatusCallbackMethodThe HTTP method Twilio will use to make requests to the StatusCallback URL. Either GET or POST.

Voice Configuration Properties

voice-configuration-properties-2 page anchor
PropertyDescription
Configurations.Voice.ApplicationSidThe 34 character sid of the voice application(link takes you to an external page) Twilio should use to handle Voice sent to this number. If an VoiceApplicationSid is present, Twilio will ignore all of the VoiceUrls above and use those set on the application.
Configurations.Voice.UrlThe URL Twilio will request when this phone number receives a call. The VoiceURL will no longer be used if a VoiceApplicationSid or a TrunkSid is set.
Configurations.Voice.MethodThe HTTP method Twilio will use when requesting the above Url. Either GET or POST. The URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url.
Configurations.Voice.FallbackUrlThe URL that Twilio will request if an error occurs retrieving or executing the TwiML requested by Url.
Configurations.Voice.FallbackMethodThe HTTP method Twilio will use when requesting the VoiceFallbackUrl. Either GET or POST.

Sms Configuration Properties

sms-configuration-properties-2 page anchor
PropertyDescription
Configurations.Sms.ApplicationSidThe 34 character sid of the application(link takes you to an external page) Twilio should use to handle SMSs sent to this number. If an SmsApplicationSid is present, Twilio will ignore all of the SMS urls above and use those set on the application.
Configurations.Sms.UrlThe URL Twilio will request when this phone number receives a message. The SmsUrl will no longer be used if an SmsApplicationSid is set.
Configurations.Sms.MethodThe HTTP method Twilio will use when making requests to the SmsUrl. Either GET or POST.
Configurations.Sms.FallbackUrlThe URL that Twilio will request if an error occurs retrieving or executing the TwiML from SmsUrl. The HTTP method Twilio will use when requesting the above URL. Either GET or POST.
Configurations.Sms.FallbackMethodThe HTTP method Twilio will use when requesting the above URL. Either GET or POST.

Transfer number to subaccount

transfer-number-to-subaccount page anchor
1
$ curl -XPOST https://preview.twilio.com/Numbers/ActiveNumbers/PNyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyyy.json \
2
-d "AccountSid=ACzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz" \
3
-u '<ACCOUNT_SID:AUTH_TOKEN>'

Example: Transfer number to subaccount

example-transfer-number-to-subaccount page anchor

You can transfer phone numbers between two Twilio accounts if you're using subaccounts. For details, see Exchanging Numbers Between Subaccounts.

Release this phone number from your account. Twilio will no longer answer calls to this number, and you will stop being billed the monthly phone number fee. The phone number will eventually be recycled and potentially given to another customer, so use with care. If you make a mistake, contact us. We may be able to give you the number back.

If successful, returns an HTTP 204 response with no body.

1
$ curl -G https://preview.twilio.com/Numbers/ActiveNumbers \
2
-u '<ACCOUNT_SID:AUTH_TOKEN>'

Output

1
{
2
"items": [
3
{
4
"phone_number": "+1555223000",
5
"capabilities": {
6
"voice": {
7
"inbound_connectivity": true,
8
"outbound_connectivity": true,
9
"e911": true,
10
"fax": true,
11
"sip_trunking": true,
12
"calls_per_second": 30,
13
"concurrent_calls_limit": 30,
14
"long_record_length": 30,
15
"inbound_called_dtmf": true,
16
"inbound_caller_dtmf": true,
17
"inbound_caller_id_preservation": "international",
18
"inbound_reachability": "global",
19
"codecs": [
20
"g711u"
21
]
22
},
23
"sms": {
24
"inbound_connectivity": true,
25
"outbound_connectivity": true,
26
"gsm7": true,
27
"ucs2": true,
28
"gsm7_concatenation": true,
29
"ucs2_concatenation": true,
30
"inbound_sender_id_preservation": "international",
31
"inbound_reachability": "global",
32
"inbound_mps": -1
33
},
34
"mms": {
35
"inbound_connectivity": true,
36
"outbound_connectivity": true,
37
"inbound_reachability": "global",
38
"inbound_mps": -1
39
}
40
},
41
"regulatory": {
42
"address_requirements": "none"
43
},
44
"type": "local",
45
"lifecycle": "generally-available",
46
"geography": {
47
"iso_country": "US",
48
"lata": 132,
49
"rate_center": "HUNTINGTON",
50
"latitude": 40.8719,
51
"longitude": -73.4347,
52
"region": "NY",
53
"locality": "HUNTINGTON",
54
"postal_code": "11743"
55
},
56
"configurations": {
57
"voice": {
58
"application_sid": null,
59
"trunk_sid": null,
60
"emergency_status": "Inactive",
61
"emergency_address_sid": null,
62
"receive_mode": "voice",
63
"url": null,
64
"method": null,
65
"fallback_url": null,
66
"fallback_method": null,
67
"caller_id_lookup": false
68
},
69
"sms": {
70
"application_sid": null,
71
"url": null,
72
"method": null,
73
"fallback_url": null,
74
"fallback_method": null
75
},
76
"mms": {
77
"application_sid": null,
78
"url": null,
79
"method": null,
80
"fallback_url": null,
81
"fallback_method": null
82
},
83
"status_callback": "",
84
"status_callback_method": "POST"
85
}
86
}
87
],
88
"meta": {
89
"page": 0,
90
"page_size": 50,
91
"first_page_url": "https://preview.twilio.com/Numbers/ActiveNumbers/US?PhoneNumber=+1552230000&PageSize=50&Page=0",
92
"previous_page_url": null,
93
"url": "https://preview.twilio.com/Numbers/ActiveNumbers?PhoneNumber=+16312237469&PageSize=50&Page=0",
94
"next_page_url": null,
95
"key": "items"
96
}
97
}

ActiveNumbers List Resource

list page anchor
1
preview.twilio.com/Numbers/ActiveNumbers
2

Returns a list of ActiveNumber resource representations, each representing a phone number given to your account. The list includes paging information(link takes you to an external page).

The following parameters are accessible as GET filters. Note, parameters are case-sensitive:

PropertyDescription
PhoneNumberThe phone number you want to purchase. The number should be formatted starting with a '+' followed by the country code and the number
TypeThe type of phone number (i.e., local, mobile, toll-free, short code, etc.).
Capabilities.Voice.InboundCallerIdPreservationInbound Voice Caller ID (+E.164 format)(link takes you to an external page) preservation of a number. Can be - International, Domestic, or None.
Capabilities.Voice.InboundReachabilityInbound Voice reachability of a number. Can be - Domestic, Foreign, or Global.
Capabilities.Sms.InboundSenderIdPreservationInbound SMS Sender ID (+E.164 format)(link takes you to an external page) preservation of a number. Can be - International, Domestic, or None.
Capabilities.Sms.InboundReachabilityInbound SMS reachability of a number. Can be - Domestic, Foreign, or Global.
Capabilities.Mms.InboundReachabilityInbound MMS reachability of a number. Can be - Domestic, Foreign, or Global.
Geography.IsoCountryThe ISO country code(link takes you to an external page) of this phone number.
Geography.LataThe LATA(link takes you to an external page) of this phone number. Only available for countries in the North American Numbering Plan (NANPA)(link takes you to an external page).
Geography.RateCenterThe rate center(link takes you to an external page) of this phone number. Only available for countries in the North American Numbering Plan (NANPA)(link takes you to an external page).
Geography.LatitudeThe latitude coordinate of this phone number.
Geography.LongitudeThe longitude coordinate of this phone number.
Geography.RegionThe two-letter state or province abbreviation of this phone number.
Geography.LocalityThe locality/city of this phone number.
Geography.PostalCodeThe postal (zip) code of this phone number.

Example: List all Active Numbers

example-list-all-active-numbers page anchor

You can manage your numbers by creating a list of all numbers that meet your search criteria filters.

Purchases a new phone number for your account. If a phone number is found for your request, Twilio will add it to your account and bill you for the first month's cost of the phone number. If Twilio cannot find a phone number to match your request, you will receive an HTTP 400 with Twilio error code 21452.

If the number you are trying to purchase requires an identity document on file and you don't have a verified identity document associated with your account, you will receive an HTTP 400 with Twilio error code 21650. See this support article(link takes you to an external page) for more details.

To find an available phone number to POST, use the AvailableNumbers list resource.

(warning)

Warning

You cannot request numbers via the API while you are using a Free Trial account. You must upgrade your account to purchase a Twilio phone number programmatically.

Your request must include the following parameter:

ParameterDescription
PhoneNumberThe phone number you want to purchase. The number should be formatted starting with a '+' followed by the country code and the number in E.164(link takes you to an external page) format e.g., '+15105555555'. You must include this parameter to have your POST succeed.

Your request may include the following parameters that are referenced as resource properties. If successful, Twilio responds with a representation of the new phone number that was assigned to your account.

1
$ curl -XPOST https://preview.twilio.com/Numbers/ActiveNumbers \
2
-d "PhoneNumber=+14155551234" \
3
-u '<ACCOUNT_SID:AUTH_TOKEN>'

Output

1
{
2
"items": [
3
{
4
"phone_number": "+15552230000",
5
"capabilities": {
6
"voice": {
7
"inbound_connectivity": true,
8
"outbound_connectivity": true,
9
"e911": true,
10
"fax": true,
11
"sip_trunking": true,
12
"calls_per_second": 30,
13
"concurrent_calls_limit": 30,
14
"long_record_length": 30,
15
"inbound_called_dtmf": true,
16
"inbound_caller_dtmf": true,
17
"inbound_caller_id_preservation": "international",
18
"inbound_reachability": "global",
19
"codecs": [
20
"g711u"
21
]
22
},
23
"sms": {
24
"inbound_connectivity": true,
25
"outbound_connectivity": true,
26
"gsm7": true,
27
"ucs2": true,
28
"gsm7_concatenation": true,
29
"ucs2_concatenation": true,
30
"inbound_sender_id_preservation": "international",
31
"inbound_reachability": "global",
32
"inbound_mps": -1
33
},
34
"mms": {
35
"inbound_connectivity": true,
36
"outbound_connectivity": true,
37
"inbound_reachability": "global",
38
"inbound_mps": -1
39
}
40
},
41
"regulatory": {
42
"address_requirements": "none"
43
},
44
"type": "local",
45
"lifecycle": "generally-available",
46
"geography": {
47
"iso_country": "US",
48
"lata": 132,
49
"rate_center": "HUNTINGTON",
50
"latitude": 40.8719,
51
"longitude": -73.4347,
52
"region": "NY",
53
"locality": "HUNTINGTON",
54
"postal_code": "11743"
55
},
56
"configurations": {
57
"voice": {
58
"application_sid": null,
59
"trunk_sid": null,
60
"emergency_status": "Inactive",
61
"emergency_address_sid": null,
62
"receive_mode": "voice",
63
"url": null,
64
"method": null,
65
"fallback_url": null,
66
"fallback_method": null,
67
"caller_id_lookup": false
68
},
69
"sms": {
70
"application_sid": null,
71
"url": null,
72
"method": null,
73
"fallback_url": null,
74
"fallback_method": null,
75
},
76
"mms": {
77
"application_sid": null,
78
"url": null,
79
"method": null,
80
"fallback_url": null,
81
"fallback_method": null,
82
},
83
"status_callback": "",
84
"status_callback_method": "POST"
85
}
86
}
87
}
88
],
89
"meta": {
90
"page": 0,
91
"page_size": 50,
92
"first_page_url": "https://preview.twilio.com/Numbers/ActiveNumbers/US?PhoneNumber=+16312237469&PageSize=50&Page=0",
93
"previous_page_url": null,
94
"url": "https://preview.twilio.com/Numbers/ActiveNumbers?PhoneNumber=+16312237469&PageSize=50&Page=0",
95
"next_page_url": null,
96
"key": "items"
97
}
98
}

Example: Purchase new phone number

example-purchase-new-phone-number page anchor

The ActiveNumbers list resource represents an account's Twilio phone numbers. You can POST to the list resource to provision a new Twilio number. To find a new number to provision use the resources the AvailableNumbers resource.

Not Supported.

Not Supported.

Need some help?

Terms of service

Copyright © 2024 Twilio Inc.