Update a voice clone
Updates the name, language, or gender of a voice clone.
PATCH
/
voice_clones
/
{id}
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const voiceClone = await client.voiceClones.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
name: 'updated-clone',
});
console.log(voiceClone.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
voice_clone = client.voice_clones.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="updated-clone",
)
print(voice_clone.data)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"),
)
voiceClone, err := client.VoiceClones.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.VoiceCloneUpdateParams{
Name: "updated-clone",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", voiceClone.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.voiceclones.VoiceCloneUpdateParams;
import com.telnyx.sdk.models.voiceclones.VoiceCloneUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VoiceCloneUpdateParams params = VoiceCloneUpdateParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.name("updated-clone")
.build();
VoiceCloneUpdateResponse voiceClone = client.voiceClones().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
voice_clone = telnyx.voice_clones.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", name: "updated-clone")
puts(voice_clone)telnyx voice-clones update \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--name updated-clonecurl --request PATCH \
--url https://api.telnyx.com/v2/voice_clones/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "updated-clone"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telnyx.com/v2/voice_clones/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'updated-clone'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"record_type": "voice_clone",
"id": "660f9511-f3ac-52e5-b827-557766551111",
"source_voice_design_id": "550e8400-e29b-41d4-a716-446655440000",
"source_voice_design_version": 1,
"name": "clone-narrator",
"language": "en",
"gender": "male",
"label": "Speak in a warm, friendly tone",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"provider": "Telnyx",
"provider_supported_models": [
"Qwen3TTS"
],
"provider_voice_id": "660f9511-f3ac-52e5-b827-557766551111"
}
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}Path Parameters
The voice clone UUID.
Body
application/json
Response
Voice clone updated successfully.
Response envelope for a single voice clone.
A voice clone object.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
JavaScript
import Telnyx from 'telnyx';
const client = new Telnyx({
apiKey: process.env['TELNYX_API_KEY'], // This is the default and can be omitted
});
const voiceClone = await client.voiceClones.update('182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e', {
name: 'updated-clone',
});
console.log(voiceClone.data);import os
from telnyx import Telnyx
client = Telnyx(
api_key=os.environ.get("TELNYX_API_KEY"), # This is the default and can be omitted
)
voice_clone = client.voice_clones.update(
id="182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
name="updated-clone",
)
print(voice_clone.data)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"),
)
voiceClone, err := client.VoiceClones.Update(
context.TODO(),
"182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
telnyx.VoiceCloneUpdateParams{
Name: "updated-clone",
},
)
if err != nil {
panic(err.Error())
}
fmt.Printf("%+v\n", voiceClone.Data)
}package com.telnyx.sdk.example;
import com.telnyx.sdk.client.TelnyxClient;
import com.telnyx.sdk.client.okhttp.TelnyxOkHttpClient;
import com.telnyx.sdk.models.voiceclones.VoiceCloneUpdateParams;
import com.telnyx.sdk.models.voiceclones.VoiceCloneUpdateResponse;
public final class Main {
private Main() {}
public static void main(String[] args) {
TelnyxClient client = TelnyxOkHttpClient.fromEnv();
VoiceCloneUpdateParams params = VoiceCloneUpdateParams.builder()
.id("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e")
.name("updated-clone")
.build();
VoiceCloneUpdateResponse voiceClone = client.voiceClones().update(params);
}
}require "telnyx"
telnyx = Telnyx::Client.new(api_key: "My API Key")
voice_clone = telnyx.voice_clones.update("182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e", name: "updated-clone")
puts(voice_clone)telnyx voice-clones update \
--api-key 'My API Key' \
--id 182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e \
--name updated-clonecurl --request PATCH \
--url https://api.telnyx.com/v2/voice_clones/{id} \
--header 'Content-Type: application/json' \
--data '
{
"name": "updated-clone"
}
'<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.telnyx.com/v2/voice_clones/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'updated-clone'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"record_type": "voice_clone",
"id": "660f9511-f3ac-52e5-b827-557766551111",
"source_voice_design_id": "550e8400-e29b-41d4-a716-446655440000",
"source_voice_design_version": 1,
"name": "clone-narrator",
"language": "en",
"gender": "male",
"label": "Speak in a warm, friendly tone",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z",
"provider": "Telnyx",
"provider_supported_models": [
"Qwen3TTS"
],
"provider_voice_id": "660f9511-f3ac-52e5-b827-557766551111"
}
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}{
"errors": [
{
"code": "10005",
"title": "Resource not found",
"detail": "Voice design not found"
}
]
}