Create a sound
curl --request POST \
--url https://api.cloudtalk.io/v1/sounds \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Holiday greeting",
"text": "Thank you for calling. Our office is closed today.",
"voice": "rachel",
"language": "en"
}
'import requests
url = "https://api.cloudtalk.io/v1/sounds"
payload = {
"name": "Holiday greeting",
"text": "Thank you for calling. Our office is closed today.",
"voice": "rachel",
"language": "en"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Holiday greeting',
text: 'Thank you for calling. Our office is closed today.',
voice: 'rachel',
language: 'en'
})
};
fetch('https://api.cloudtalk.io/v1/sounds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudtalk.io/v1/sounds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Holiday greeting',
'text' => 'Thank you for calling. Our office is closed today.',
'voice' => 'rachel',
'language' => 'en'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudtalk.io/v1/sounds"
payload := strings.NewReader("{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudtalk.io/v1/sounds")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/sounds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"id": "82",
"name": "Holiday greeting",
"scope": "account",
"status": "processing",
"inUse": false,
"createdAt": "2026-11-06T10:11:30Z",
"updatedAt": "2026-11-06T10:11:30Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "CONFLICT",
"message": "A request with this Idempotency-Key is in progress. Retry the request.",
"target": "Idempotency-Key"
},
"requestId": "0d9b6e3f21"
}{
"error": {
"code": "VALIDATION.INVALID_BODY",
"message": "Request body is too large."
},
"requestId": "8c1f4a2e60"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "SOUNDS.TEXT_TO_SPEECH_LIMIT",
"message": "The text-to-speech limit of your account was reached. Retry after the time in Retry-After."
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "TIMEOUT",
"message": "The request did not finish in time and may still complete. Read the resource before you retry; retry a create with the same Idempotency-Key."
},
"requestId": "5e2a9c71d0"
}Sounds
Create a sound
Creates a sound from text (text-to-speech) or from an audio file. The answer comes back with status: processing. The sound then turns ready, or failed when it cannot be converted: check its status with Get a sound before you rely on it. A flow save that uses a failed sound is refused with 422 CALL_FLOWS.SOUND_FAILED. Use its id as soundId in a call flow or a closed action.
- From text,
Content-Type: application/json:name,text, avoicefrom List text-to-speech voices and alanguageit offers. Text-to-speech has its own per-account limit: over it, the answer is429 SOUNDS.TEXT_TO_SPEECH_LIMITwithRetry-After. - From a file,
Content-Type: multipart/form-data: anamefield and afilepart, MP3, up to 8 MB. - Retries. Send an
Idempotency-Keyto retry safely. The same key with the same body returns the first answer again; the same key with another body is422 IDEMPOTENCY.KEY_REUSED. Keys are kept for 24 hours.
POST
/
sounds
Create a sound
curl --request POST \
--url https://api.cloudtalk.io/v1/sounds \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Holiday greeting",
"text": "Thank you for calling. Our office is closed today.",
"voice": "rachel",
"language": "en"
}
'import requests
url = "https://api.cloudtalk.io/v1/sounds"
payload = {
"name": "Holiday greeting",
"text": "Thank you for calling. Our office is closed today.",
"voice": "rachel",
"language": "en"
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Holiday greeting',
text: 'Thank you for calling. Our office is closed today.',
voice: 'rachel',
language: 'en'
})
};
fetch('https://api.cloudtalk.io/v1/sounds', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cloudtalk.io/v1/sounds",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Holiday greeting',
'text' => 'Thank you for calling. Our office is closed today.',
'voice' => 'rachel',
'language' => 'en'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cloudtalk.io/v1/sounds"
payload := strings.NewReader("{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cloudtalk.io/v1/sounds")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cloudtalk.io/v1/sounds")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Holiday greeting\",\n \"text\": \"Thank you for calling. Our office is closed today.\",\n \"voice\": \"rachel\",\n \"language\": \"en\"\n}"
response = http.request(request)
puts response.read_body{
"id": "82",
"name": "Holiday greeting",
"scope": "account",
"status": "processing",
"inUse": false,
"createdAt": "2026-11-06T10:11:30Z",
"updatedAt": "2026-11-06T10:11:30Z"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"code": "UNAUTHORIZED",
"message": "You are not authorized to access this resource."
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "CONFLICT",
"message": "A request with this Idempotency-Key is in progress. Retry the request.",
"target": "Idempotency-Key"
},
"requestId": "0d9b6e3f21"
}{
"error": {
"code": "VALIDATION.INVALID_BODY",
"message": "Request body is too large."
},
"requestId": "8c1f4a2e60"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "SOUNDS.TEXT_TO_SPEECH_LIMIT",
"message": "The text-to-speech limit of your account was reached. Retry after the time in Retry-After."
},
"requestId": "c41f0a9e2b"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>",
"details": [
{
"code": "<string>",
"message": "<string>",
"target": "<string>"
}
],
"target": "<string>"
},
"requestId": "<string>"
}{
"error": {
"code": "TIMEOUT",
"message": "The request did not finish in time and may still complete. Read the resource before you retry; retry a create with the same Idempotency-Key."
},
"requestId": "5e2a9c71d0"
}Authorizations
HTTP Basic Authentication. Use your API Access Key ID as the username and your API Access Key Secret as the password. Generate keys in the CloudTalk Dashboard under Account -> Settings -> API Keys (https://dashboard.cloudtalk.io/menu/account/settings/API-keys).
Headers
Body
application/jsonmultipart/form-data
Response
The new sound.