Skip to main content

List of AvailablePhoneNumber Resources

Use this endpoint for the AvailablePhoneNumbers method to return a list of URIs to phone number resources available to the account. The list is categorized by type (Local, Toll-Free, Mobile, etc) and ISO country.

Parameters

Parameter
None

Examples

Request

curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json \
-X GET \
-u "YourProjectID:YourAuthToken"

Response

200 OK

{
"countries": [
{
"beta": false,
"country": "United States",
"country_code": "US",
"subresource_uris": {
"local": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/Local",
"toll_free": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/TollFree"
},
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US"
}
],
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers"
}

Request: List of AvailablePhoneNumber Resources in US

This example returns a list of URIs to phone number resources available to the account in the US ISO country. The URIs are categorized by type (Local, Toll-Free, Mobile, etc).

curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/US.json \
-X GET \
-u "YourProjectID:YourAuthToken"

Response

200 OK

{
"beta": null,
"country": "United States",
"country_code": "US",
"subresource_uris": {
"local": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/Local.json",
"toll_free": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US/TollFree.json"
},
"uri": "/2010-04-01/Accounts/ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/AvailablePhoneNumbers/US.json"
}