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

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

const voices = await client.phoneNumbers.voice.list();

console.log(voices.data);
{
  "data": [
    {
      "id": "1293384261075731499",
      "record_type": "voice_settings",
      "connection_id": "1d0e6cb8-8668-462e-94c6-49ae0f0ed48b",
      "customer_reference": "customer-reference",
      "tech_prefix_enabled": false,
      "translated_number": "+13035559999",
      "call_forwarding": {
        "call_forwarding_enabled": true,
        "forwards_to": "+13035559123",
        "forwarding_type": "always"
      },
      "cnam_listing": {
        "cnam_listing_enabled": true,
        "cnam_listing_details": "example"
      },
      "emergency": {
        "emergency_enabled": true,
        "emergency_address_id": "1315261609962112019",
        "emergency_status": "active"
      },
      "usage_payment_method": "pay-per-minute",
      "media_features": {
        "rtp_auto_adjust_enabled": true,
        "accept_any_rtp_packets_enabled": true,
        "t38_fax_gateway_enabled": true
      },
      "call_recording": {
        "inbound_call_recording_enabled": true,
        "inbound_call_recording_format": "wav",
        "inbound_call_recording_channels": "single"
      },
      "inbound_call_screening": "disabled"
    }
  ],
  "meta": {
    "page_number": 2,
    "page_size": 25,
    "total_pages": 3,
    "total_results": 55
  }
}

Authorizations

Authorization
string
header
required

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

Query Parameters

page
object

Consolidated page parameter (deepObject style). Originally: page[size], page[number]

sort
enum<string>

Specifies the sort order for results. If not given, results are sorted by created_at in descending order.

Available options:
purchased_at,
phone_number,
connection_name,
usage_payment_method
Example:

"connection_name"

filter
object

Consolidated filter parameter (deepObject style). Originally: filter[phone_number], filter[connection_name], filter[customer_reference], filter[voice.usage_payment_method]

Response

Successful response with a list of phone numbers with voice settings.

data
object[]
meta
object