AvailablePhoneNumber Mobile resource
The AvailablePhoneNumberMobile
resource lets you search for mobile phone numbers that are available for you to purchase. You can search for phone numbers that match a pattern, are in a certain country, are in certain area code (NPA) or exchange (NXX) or are in a specific geography.
Once you've found an available number you want to purchase, make an HTTP POST request to the IncomingPhoneNumbers list resource passing the number as the 'PhoneNumber' parameter.
We work hard to keep a wide variety of numbers in stock at all times. See our pricing pages for country availability.
AvailablePhoneNumberMobile properties
Resource Properties in REST API format | |
---|---|
friendly_name
|
A formatted version of the phone number. |
phone_number
|
The phone number in E.164 format, which consists of a + followed by the country code and subscriber number. |
lata
|
The LATA of this phone number. Available for only phone numbers from the US and Canada. |
locality
|
The locality or city of this phone number's location. |
rate_center
|
The rate center of this phone number. Available for only phone numbers from the US and Canada. |
latitude
|
The latitude of this phone number's location. Available for only phone numbers from the US and Canada. |
longitude
|
The longitude of this phone number's location. Available for only phone numbers from the US and Canada. |
region
|
The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada. |
postal_code
|
The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada. |
iso_country
|
The ISO country code of this phone number. |
address_requirements
|
The type of Address resource the phone number requires. Can be: |
beta
|
Whether the phone number is new to the Twilio platform. Can be: |
capabilities
|
The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are: |
Read multiple AvailablePhoneNumberMobile resources
https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/Mobile.json
Parameters
Parameters in REST API format | |
---|---|
account_sid
Path
|
The SID of the Account requesting the AvailablePhoneNumber resources. |
country_code
Path
|
The ISO-3166-1 country code of the country from which to read phone numbers. |
area_code
Optional
|
The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada. |
contains
Optional
|
The pattern on which to match phone numbers. Valid characters are |
sms_enabled
Optional
|
Whether the phone numbers can receive text messages. Can be: |
mms_enabled
Optional
|
Whether the phone numbers can receive MMS messages. Can be: |
voice_enabled
Optional
|
Whether the phone numbers can receive calls. Can be: |
exclude_all_address_required
Optional
|
Whether to exclude phone numbers that require an Address. Can be: |
exclude_local_address_required
Optional
|
Whether to exclude phone numbers that require a local Address. Can be: |
exclude_foreign_address_required
Optional
|
Whether to exclude phone numbers that require a foreign Address. Can be: |
beta
Optional
|
Whether to read phone numbers that are new to the Twilio platform. Can be: |
near_number
Optional
|
Given a phone number, find a geographically close number within |
near_lat_long
Optional
|
Given a latitude/longitude pair |
distance
Optional
|
The search radius, in miles, for a |
in_postal_code
Optional
|
Limit results to a particular postal code. Given a phone number, search within the same postal code as that number. Applies to only phone numbers in the US and Canada. |
in_region
Optional
|
Limit results to a particular region, state, or province. Given a phone number, search within the same region as that number. Applies to only phone numbers in the US and Canada. |
in_rate_center
Optional
|
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires |
in_lata
Optional
|
Limit results to a specific local access and transport area (LATA). Given a phone number, search within the same LATA as that number. Applies to only phone numbers in the US and Canada. |
in_locality
Optional
|
Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number. |
fax_enabled
Optional
|
Whether the phone numbers can receive faxes. Can be: |
Example 1
Need some help?
We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd by visiting Twilio's Stack Overflow Collective or browsing the Twilio tag on Stack Overflow.