List available phone numbers
GET/available_phone_numbers
List available phone numbers
Request
Query Parameters
Filter numbers starting with a pattern (excludes NDC if used with national_destination_code
filter).
Filter numbers ending with a pattern (excludes NDC if used with national_destination_code
filter).
Filter numbers containing a pattern (excludes NDC if used with national_destination_code
filter).
Filter phone numbers by city.
Find numbers in a particular US state or CA province.
Filter phone numbers by country.
Filter by the national destination code of the number.
Filter phone numbers by rate center. This filter is only applicable to USA and Canada numbers.
Possible values: [local
, toll_free
, mobile
, national
, shared_cost
]
Filter phone numbers by number type.
Possible values: [sms
, mms
, voice
, fax
, emergency
, hd_voice
, international_sms
, local_calling
]
Filter phone numbers with specific features.
Limits the number of results.
Filter to determine if best effort results should be included. Only available in USA/CANADA.
Filter to exclude phone numbers that need additional time after to purchase to activate. Only applicable for +1 toll_free numbers.
Filter to ensure only numbers that can be reserved are included in the results.
Filter to exclude phone numbers that are currently on hold/reserved for your account.
Responses
200: Successful response with a list of available phone numbers.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/available_phone_numbers' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"record_type": "available_phone_number",
"phone_number": "+19705555098",
"vanity_format": "",
"best_effort": false,
"quickship": true,
"reservable": true,
"region_information": [
{
"region_type": "country_code",
"region_name": "US"
}
],
"cost_information": {
"upfront_cost": "3.21",
"monthly_cost": "6.54",
"currency": "USD"
},
"features": [
{
"name": "sms"
},
{
"name": "voice"
}
]
}
],
"meta": {
"total_results": 100,
"best_effort_results": 50
}
}
{
"errors": [
{
"code": "10007",
"title": "Unexpected error",
"detail": "An unexpected error occured.",
"source": {
"pointer": "/base",
"parameter": "string"
},
"meta": {
"url": "https://developers.telnyx.com/docs/overview/errors/10015"
}
}
]
}