List available phone number toll free

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

Available toll free phone numbers

Path parameters

  • AccountSid string Required

    The SID of the Account requesting the AvailablePhoneNumber resources.

  • CountryCode string(iso-country-code) Required

    The ISO-3166-1 country code of the country from which to read phone numbers.

Query parameters

  • AreaCode integer

    The area code of the phone numbers to read. Applies to only phone numbers in the US and Canada.

  • Contains string

    The pattern on which to match phone numbers. Valid characters are *, 0-9, a-z, and A-Z. The * character matches any single digit. For examples, see Example 2 and Example 3. If specified, this value must have at least two characters.

  • SmsEnabled boolean

    Whether the phone numbers can receive text messages. Can be: true or false.

  • MmsEnabled boolean

    Whether the phone numbers can receive MMS messages. Can be: true or false.

  • Whether the phone numbers can receive calls. Can be: true or false.

  • Whether to exclude phone numbers that require an Address. Can be: true or false and the default is false.

  • Whether to exclude phone numbers that require a local Address. Can be: true or false and the default is false.

  • Whether to exclude phone numbers that require a foreign Address. Can be: true or false and the default is false.

  • Beta boolean

    Whether to read phone numbers that are new to the Twilio platform. Can be: true or false and the default is true.

  • NearNumber string(phone-number)

    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 within distance miles. Applies to only phone numbers in the US and Canada.

  • Distance integer

    The search radius, in miles, for a near_ query. Can be up to 500 and the default is 25. 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.

  • InRegion string

    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.

  • InLata string

    Limit results to a specific local access and transport area (LATA). Given a phone number, search within the same LATA as that number. 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.

  • FaxEnabled boolean

    Whether the phone numbers can receive faxes. Can be: true or false.

  • PageSize integer

    How many resources to return in each list page. The default is 50, and the maximum is 1000.

    Minimum value is 1, maximum value is 1000.

Responses

  • OK

    Hide response attributes Show response attributes object
    • Hide available_phone_numbers attributes Show available_phone_numbers attributes array[object]
      • The type of Address resource the phone number requires

      • beta boolean | null

        Whether the phone number is new to the Twilio platform

      • capabilities object(phone-number-capabilities) | null

        Whether a phone number can receive calls or messages

        Hide capabilities attributes Show capabilities attributes object(phone-number-capabilities) | null
      • friendly_name string(phone-number) | null

        A formatted version of the phone number

      • iso_country string(iso-country-code) | null

        The ISO country code of this phone number

      • lata string | null

        The LATA of this phone number

      • latitude string | null

        The latitude of this phone number's location

      • locality string | null

        The locality or city of this phone number's location

      • longitude string | null

        The longitude of this phone number's location

      • phone_number string(phone-number) | null

        The phone number in E.164 format

      • postal_code string | null

        The postal or ZIP code of this phone number's location

      • rate_center string | null

        The rate center of this phone number

      • region string | null

        The two-letter state or province abbreviation of this phone number's location

    • end integer
    • first_page_uri string(uri)
    • next_page_uri string(uri)
    • page integer
    • page_size integer
    • start integer
    • uri string(uri)
GET /2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json
curl \
 -X GET https://api.twilio.com/2010-04-01/Accounts/{AccountSid}/AvailablePhoneNumbers/{CountryCode}/TollFree.json \
 --user "username:password"
Response examples (200)
{
  "available_phone_numbers": [
    {
      "address_requirements": "string",
      "beta": true,
      "capabilities": {
        "fax": true,
        "mms": true,
        "sms": true,
        "voice": true
      },
      "friendly_name": "string",
      "iso_country": "string",
      "lata": "string",
      "latitude": "string",
      "locality": "string",
      "longitude": "string",
      "phone_number": "string",
      "postal_code": "string",
      "rate_center": "string",
      "region": "string"
    }
  ],
  "end": 42,
  "first_page_uri": "https://example.com",
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com"
}
Response examples (200)
{
  "available_phone_numbers": [
    {
      "address_requirements": "string",
      "beta": true,
      "capabilities": {
        "fax": true,
        "mms": true,
        "sms": true,
        "voice": true
      },
      "friendly_name": "string",
      "iso_country": "string",
      "lata": "string",
      "latitude": "string",
      "locality": "string",
      "longitude": "string",
      "phone_number": "string",
      "postal_code": "string",
      "rate_center": "string",
      "region": "string"
    }
  ],
  "end": 42,
  "first_page_uri": "https://example.com",
  "next_page_uri": "https://example.com",
  "page": 42,
  "page_size": 42,
  "previous_page_uri": "https://example.com",
  "start": 42,
  "uri": "https://example.com"
}