# List of AvailablePhoneNumber Resources Use this endpoint for the [AvailablePhoneNumbers](./index.mdx) 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 shell curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers.json \ -X GET \ -u YourProjectID:YourAuthToken javascript const { RestClient } = require(@signalwire/compatibility-api) const client = RestClient(YourProjectID, YourAuthToken, { signalwireSpaceUrl: example.signalwire.com }) client .availablePhoneNumbers() .then(availablePhoneNumbers => { console.log(availablePhoneNumbers); }); csharp using System; using System.Collections.Generic; using Twilio; using Twilio.Rest.Api.V2010.Account; class Program { static void Main(string[] args) { TwilioClient.Init(YourProjectID, YourAuthToken, new Dictionary { [signalwireSpaceUrl] = {SPACE}.signalwire.com }); var availablePhoneNumbers = AvailablePhoneNumberCountryResource.Read(); Console.WriteLine(availablePhoneNumbers); } } python from signalwire.rest import Client as signalwire_client client = signalwire_client(YourProjectID, YourAuthToken, signalwire_space_url = example.signalwire.com) numbers = client.available_phone_numbers() \ .list() print(numbers) ruby require signalwire/sdk @client = Signalwire::REST::Client.new YourProjectID, YourAuthToken, signalwire_space_url: example.signalwire.com @numbers = @client.api.available_phone_numbers() .list() puts @numbers #### Response 200 OK
json { 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). shell curl https://example.signalwire.com/api/laml/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/US.json \ -X GET \ -u YourProjectID:YourAuthToken javascript const { RestClient } = require(@signalwire/compatibility-api) const client = RestClient(YourProjectID, YourAuthToken, { signalwireSpaceUrl: example.signalwire.com }) client .availablePhoneNumbers(US) .fetch() .then(availablePhoneNumbers => { console.log(availablePhoneNumbers); }); csharp using System; using System.Collections.Generic; using Twilio; using Twilio.Rest.Api.V2010.Account; class Program { static void Main(string[] args) { TwilioClient.Init(YourProjectID, YourAuthToken, new Dictionary { [signalwireSpaceUrl] = {SPACE}.signalwire.com }); var availablePhoneNumbers = AvailablePhoneNumberCountryResource.Fetch(US); Console.WriteLine(availablePhoneNumbers); } } python from signalwire.rest import Client as signalwire_client client = signalwire_client(YourProjectID, YourAuthToken, signalwire_space_url = example.signalwire.com) numbers = client.available_phone_numbers(US) \ .fetch() print(numbers) ruby require signalwire/sdk @client = Signalwire::REST::Client.new YourProjectID, YourAuthToken, signalwire_space_url: example.signalwire.com @numbers = @client.api.available_phone_numbers(US) .fetch() puts @numbers #### Response 200 OK
json { 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 }