List available phone number blocks
GET/available_phone_number_blocks
List available phone number blocks
Request
Query Parameters
filter[locality] stringExamples:
Filter phone numbers by city.
filter[country_code] stringExamples:
Filter phone numbers by country.
filter[national_destination_code] stringExamples:
Filter by the national destination code of the number.
filter[phone_number_type] string
Possible values: [local
, toll_free
, mobile
, national
, shared_cost
]
Filter phone numbers by number type.
Responses
200: Successful response with a list of available phone numbers blocks.
- application/json
default: Unexpected error
- application/json
Request samples
curl -L 'https://api.telnyx.com/v2/available_phone_number_blocks' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>'
Response samples
{
"data": [
{
"record_type": "available_phone_number_block",
"phone_number": "+19705555000",
"range": 10,
"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"
}
}
]
}