Skip to main content
GET
/
available_phone_number_blocks
JavaScript
import Telnyx from 'telnyx';

const client = new Telnyx({
  apiKey: 'My API Key',
});

const availablePhoneNumberBlocks = await client.availablePhoneNumberBlocks.list();

console.log(availablePhoneNumberBlocks.data);
{
  "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
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[locality], filter[country_code], filter[national_destination_code], filter[phone_number_type]

Response

Successful response with a list of available phone numbers blocks.

data
object[]
meta
object
Example:
{
"total_results": 100,
"best_effort_results": 50
}