curl --request PUT \
--url https://api.anam.ai/v1/pronunciation-dictionaries/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedRevision": 1,
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "Lab",
"pronunciation": "lab"
}
]
}
'import requests
url = "https://api.anam.ai/v1/pronunciation-dictionaries/{id}"
payload = {
"expectedRevision": 1,
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "Lab",
"pronunciation": "lab"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedRevision: 1,
entries: [{text: 'Anam', pronunciation: 'annum'}, {text: 'Lab', pronunciation: 'lab'}]
})
};
fetch('https://api.anam.ai/v1/pronunciation-dictionaries/{id}', 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.anam.ai/v1/pronunciation-dictionaries/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expectedRevision' => 1,
'entries' => [
[
'text' => 'Anam',
'pronunciation' => 'annum'
],
[
'text' => 'Lab',
'pronunciation' => 'lab'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.anam.ai/v1/pronunciation-dictionaries/{id}"
payload := strings.NewReader("{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.anam.ai/v1/pronunciation-dictionaries/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/pronunciation-dictionaries/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "4f600129-13cf-4bfa-909a-2f4c31467f43",
"name": "Brand names",
"revision": 2,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z",
"entries": [
{
"text": "Anam",
"kind": "sounds_like",
"pronunciation": "annum",
"caseSensitive": false
},
{
"text": "Lab",
"kind": "sounds_like",
"pronunciation": "lab",
"caseSensitive": false
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "Pronunciation dictionary has changed since expectedRevision. Read it again, then retry.",
"code": "REVISION_CONFLICT"
}{
"error": "Invalid pronunciation dictionary",
"details": [
{
"row": 2,
"field": "pronunciation",
"message": "Must not contain [ or ]"
},
{
"row": 3,
"field": "text",
"message": "Same word or phrase as row 1. Remove one, or turn on Match case for both if they differ only in case."
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}update pronunciation dictionary
Updates a pronunciation dictionary’s name, entries or both. entries replaces the whole list. The save is live: sessions that start afterwards use the new entries, and running sessions keep the entries they started with.
Without expectedRevision, the update applies to the current revision and the last write wins. With it, the update is rejected with 409 REVISION_CONFLICT if the dictionary has been saved since that revision.
Entries are validated as a whole: if any entry is invalid, nothing is saved and the response lists every error by one-based row.
curl --request PUT \
--url https://api.anam.ai/v1/pronunciation-dictionaries/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"expectedRevision": 1,
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "Lab",
"pronunciation": "lab"
}
]
}
'import requests
url = "https://api.anam.ai/v1/pronunciation-dictionaries/{id}"
payload = {
"expectedRevision": 1,
"entries": [
{
"text": "Anam",
"pronunciation": "annum"
},
{
"text": "Lab",
"pronunciation": "lab"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
expectedRevision: 1,
entries: [{text: 'Anam', pronunciation: 'annum'}, {text: 'Lab', pronunciation: 'lab'}]
})
};
fetch('https://api.anam.ai/v1/pronunciation-dictionaries/{id}', 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.anam.ai/v1/pronunciation-dictionaries/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'expectedRevision' => 1,
'entries' => [
[
'text' => 'Anam',
'pronunciation' => 'annum'
],
[
'text' => 'Lab',
'pronunciation' => 'lab'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"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.anam.ai/v1/pronunciation-dictionaries/{id}"
payload := strings.NewReader("{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.put("https://api.anam.ai/v1/pronunciation-dictionaries/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/pronunciation-dictionaries/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"expectedRevision\": 1,\n \"entries\": [\n {\n \"text\": \"Anam\",\n \"pronunciation\": \"annum\"\n },\n {\n \"text\": \"Lab\",\n \"pronunciation\": \"lab\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "4f600129-13cf-4bfa-909a-2f4c31467f43",
"name": "Brand names",
"revision": 2,
"createdAt": "2026-10-11T09:00:00.000Z",
"updatedAt": "2026-10-11T09:30:00.000Z",
"entries": [
{
"text": "Anam",
"kind": "sounds_like",
"pronunciation": "annum",
"caseSensitive": false
},
{
"text": "Lab",
"kind": "sounds_like",
"pronunciation": "lab",
"caseSensitive": false
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}{
"error": "Pronunciation dictionary has changed since expectedRevision. Read it again, then retry.",
"code": "REVISION_CONFLICT"
}{
"error": "Invalid pronunciation dictionary",
"details": [
{
"row": 2,
"field": "pronunciation",
"message": "Must not contain [ or ]"
},
{
"row": 3,
"field": "text",
"message": "Same word or phrase as row 1. Remove one, or turn on Match case for both if they differ only in case."
}
]
}{
"error": "<string>",
"code": "REVISION_CONFLICT",
"personaIds": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Pronunciation dictionary ID
Body
- Option 1
- Option 2
Provide name, entries or both.
New display name
1 - 200"Brand names"
The complete new list of entries. An empty array removes every entry.
500Show child attributes
Show child attributes
The revision you last read. Optional.
x >= 11
Response
Successfully updated pronunciation dictionary
A pronunciation dictionary and its entries. Saves are live: sessions that start after a save use the saved entries, and running sessions keep the entries they started with.
Pronunciation dictionary ID. Pass it as voiceGenerationOptions.pronunciationDictionaryId when creating a session token.
"4f600129-13cf-4bfa-909a-2f4c31467f43"
Display name
"Brand names"
Starts at 1 and increases with every save. Send it as expectedRevision to reject a write if someone else saved first.
x >= 11
When the dictionary was created
When the dictionary was last saved
Show child attributes
Show child attributes
Was this page helpful?

