Fetch available phone number country

GET /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json

Country codes with available phone numbers

Path parameters

  • AccountSid string Required

    The SID of the Account requesting the available phone number Country resource.

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

  • CountryCode string(iso-country-code) Required

    The ISO-3166-1 country code of the country to fetch available phone number information about.

Responses

  • 200 application/json

    OK

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • country_code string(iso-country-code) | null

      The ISO-3166-1 country code of the country.

    • country string | null

      The name of the country.

    • uri string(uri) | null

      The URI of the Country resource, relative to https://api.twilio.com.

    • beta boolean | null

      Whether all phone numbers available in the country are new to the Twilio platform. true if they are and false if all numbers are not in the Twilio Phone Number Beta program.

    • subresource_uris object(uri-map) | null

      A list of related AvailablePhoneNumber resources identified by their URIs relative to https://api.twilio.com.

GET /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json
curl \
 --request GET 'https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}.json' \
 --user "username:password"
Response examples (200)
{
  "uri": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers/US.json",
  "beta": false,
  "country": "United States",
  "country_code": "US",
  "subresource_uris": {
    "local": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers/US/Local.json",
    "toll_free": "/2010-04-01/Accounts/ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/AvailablePhoneNumbers/US/TollFree.json"
  }
}