list_available_countries

View as MarkdownOpen in Claude

List countries that have phone numbers available for purchase.

Path parameters

AccountSidstringRequiredformat: "uuid"
The Project ID that uniquely identifies the Account to retrieve.

Response

uristringRequired
The URI for the API call.
countrieslist of objectsRequired
List of available countries.

Response Example

Response
1{
2 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers",
3 "countries": [
4 {
5 "country_code": "US",
6 "country": "United States",
7 "uri": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US",
8 "beta": false,
9 "subresource_uris": {
10 "local": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/Local",
11 "toll_free": "/api/laml/2010-04-01/Accounts/b3877c40-da60-4998-90ad-b792e98472af/AvailablePhoneNumbers/US/TollFree"
12 }
13 }
14 ]
15}

Example

1from signalwire.rest import RestClient
2
3client = RestClient(
4 project="your-project-id",
5 token="your-api-token",
6 host="your-space.signalwire.com",
7)
8
9countries = client.compat.phone_numbers.list_available_countries()