Check out our upcoming events and meetups! View events →
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const availablePhoneNumbers = await client.availablePhoneNumbers.list();
console.log(availablePhoneNumbers.data);{
"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
},
"metadata": {
"total_results": 100,
"best_effort_results": 50
}
}Documentation Index
Fetch the complete documentation index at: https://developers.telnyx.com/llms.txt
Use this file to discover all available pages before exploring further.
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Consolidated filter parameter (deepObject style). Originally: filter[phone_number], filter[locality], filter[administrative_area], filter[country_code], filter[national_destination_code], filter[rate_center], filter[phone_number_type], filter[features], filter[limit], filter[best_effort], filter[quickship], filter[reservable], filter[exclude_held_numbers]
Show child attributes
Was this page helpful?
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const availablePhoneNumbers = await client.availablePhoneNumbers.list();
console.log(availablePhoneNumbers.data);{
"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
},
"metadata": {
"total_results": 100,
"best_effort_results": 50
}
}