List available phone number shared cost
Available shared cost numbers
Path parameters
-
The SID of the Account requesting the AvailablePhoneNumber resources.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^AC[0-9a-fA-F]{32}$
. -
The ISO-3166-1 country code of the country from which to read phone numbers.
Query parameters
-
The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.
-
Whether the phone numbers can receive text messages. Can be:
true
orfalse
. -
Whether the phone numbers can receive MMS messages. Can be:
true
orfalse
. -
Whether the phone numbers can receive calls. Can be:
true
orfalse
. -
Whether to exclude phone numbers that require an Address. Can be:
true
orfalse
and the default isfalse
. -
Whether to exclude phone numbers that require a local Address. Can be:
true
orfalse
and the default isfalse
. -
Whether to exclude phone numbers that require a foreign Address. Can be:
true
orfalse
and the default isfalse
. -
Whether to read phone numbers that are new to the Twilio platform. Can be:
true
orfalse
and the default istrue
. -
Given a phone number, find a geographically close number within
distance
miles. Distance defaults to 25 miles. Applies to only phone numbers in the US and Canada. -
Given a latitude/longitude pair
lat,long
find geographically close numbers withindistance
miles. Applies to only phone numbers in the US and Canada. -
The search radius, in miles, for a
near_
query. Can be up to500
and the default is25
. Applies to only phone numbers in the US and Canada. -
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.
-
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.
-
Limit results to a specific rate center, or given a phone number search within the same rate center as that number. Requires
in_lata
to be set as well. Applies to only phone numbers in the US and Canada. -
Limit results to a particular locality or city. Given a phone number, search within the same Locality as that number.
-
Whether the phone numbers can receive faxes. Can be:
true
orfalse
. -
How many resources to return in each list page. The default is 50, and the maximum is 1000.
Minimum value is
1
, maximum value is1000
. -
The page index. This value is simply for client state.
Minimum value is
0
. -
The page token. This is provided by the API.
Responses
-
OK
Hide headers attributes Show headers attributes
-
Specify the origin(s) allowed to access the resource
-
Specify the HTTP methods allowed when accessing the resource
-
Specify the headers allowed when accessing the resource
-
Indicates whether the browser should include credentials
-
Headers exposed to the client
Hide response attributes Show response attributes object
-
Hide available_phone_numbers attributes Show available_phone_numbers attributes object
-
A formatted version of the phone number.
-
The phone number in E.164 format, which consists of a + followed by the country code and subscriber number.
-
The LATA of this phone number. Available for only phone numbers from the US and Canada.
-
The locality or city of this phone number's location.
-
The rate center of this phone number. Available for only phone numbers from the US and Canada.
-
The latitude of this phone number's location. Available for only phone numbers from the US and Canada.
-
The longitude of this phone number's location. Available for only phone numbers from the US and Canada.
-
The two-letter state or province abbreviation of this phone number's location. Available for only phone numbers from the US and Canada.
-
The postal or ZIP code of this phone number's location. Available for only phone numbers from the US and Canada.
-
The ISO country code of this phone number.
-
The type of Address resource the phone number requires. Can be:
none
,any
,local
, orforeign
.none
means no address is required.any
means an address is required, but it can be anywhere in the world.local
means an address in the phone number's country is required.foreign
means an address outside of the phone number's country is required. -
Whether the phone number is new to the Twilio platform. Can be:
true
orfalse
. -
The set of Boolean properties that indicate whether a phone number can receive calls or messages. Capabilities are:
Voice
,SMS
, andMMS
and each capability can be:true
orfalse
.
-
-
curl \
--request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/SharedCost.json' \
--user "username:password"
{
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers/US/SharedCost.json",
"available_phone_numbers": [
{
"beta": false,
"lata": null,
"region": null,
"latitude": null,
"locality": null,
"longitude": null,
"iso_country": "NO",
"postal_code": null,
"rate_center": null,
"capabilities": {
"mms": false,
"sms": true,
"voice": false
},
"phone_number": "+4759440374",
"friendly_name": "+4759440374",
"address_requirements": "none"
}
]
}
{
"uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers/US/SharedCost.json",
"available_phone_numbers": []
}