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_bodyupdate 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_bodyAuthorizations
Body
- Option 1
- Option 2
Provide name, entries or both.
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.

