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

const client = new Telnyx({
  apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});

// Automatically fetches more pages as needed.
for await (const voiceDesignListResponse of client.voiceDesigns.list()) {
  console.log(voiceDesignListResponse.id);
}
import os
from telnyx import Telnyx

client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
page = client.voice_designs.list()
page = page.data[0]
print(page.id)
package main

import (
"context"
"fmt"

"github.com/team-telnyx/telnyx-go"
"github.com/team-telnyx/telnyx-go/option"
)

func main() {
client := telnyx.NewClient(
option.WithAPIKey("My API Key"),
)
page, err := client.VoiceDesigns.List(context.TODO(), telnyx.VoiceDesignListParams{})
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", page)
}
package com.telnyx.sdk.example;

import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.voicedesigns.VoiceDesignListPage;
import com.telnyx.sdk.models.voicedesigns.VoiceDesignListParams;

public final class Main {
private Main() {}

public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();

VoiceDesignListPage page = client.voiceDesigns().list();
}
}
require "telnyx"

telnyx = Telnyx::Client.new(api_key: "My API Key")

page = telnyx.voice_designs.list

puts(page)
telnyx voice-designs list \
--api-key 'My API Key'
curl --request GET \
--url https://api.telnyx.com/v2/voice_designs
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telnyx.com/v2/voice_designs",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "data": [
    {
      "record_type": "voice_design",
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "provider_supported_models": [
        "<string>"
      ]
    }
  ],
  "meta": {
    "page_number": 1,
    "page_size": 20,
    "total_results": 42,
    "total_pages": 3
  }
}
{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}

Query Parameters

page[number]
integer
default:1

Page number for pagination (1-based).

Required range: x >= 1
page[size]
integer
default:20

Number of results per page.

Required range: 1 <= x <= 250
filter[name]
string

Case-insensitive substring filter on the name field.

sort
enum<string>
default:-created_at

Sort order. Prefix with - for descending. Defaults to -created_at.

Available options:
name,
-name,
created_at,
-created_at

Response

A paginated list of voice designs.

Paginated list of voice designs.

data
object[]

Array of voice design summary objects.

meta
object

Pagination metadata returned with list responses.

Example:
{
"page_number": 1,
"page_size": 20,
"total_results": 42,
"total_pages": 3
}