Update a pronunciation dictionary
curl --request PATCH \
--url https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entries": [
{
"grapheme": "Lehar",
"replacement": "luh-HAR",
"language": "en"
}
]
}
'import requests
url = "https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}"
payload = { "entries": [
{
"grapheme": "Lehar",
"replacement": "luh-HAR",
"language": "en"
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{grapheme: 'Lehar', replacement: 'luh-HAR', language: 'en'}]})
};
fetch('https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_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.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_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([
'entries' => [
[
'grapheme' => 'Lehar',
'replacement' => 'luh-HAR',
'language' => 'en'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "pd_01EXAMPLE",
"name": "Brand names",
"description": "How the agent should pronounce product and place names",
"entries": [
{
"grapheme": "Lehar",
"replacement": "luh-har",
"kind": "substitution",
"language": "en"
},
{
"grapheme": "Bengaluru",
"replacement": "beng-uh-loo-roo",
"kind": "substitution"
}
],
"entry_count": 2,
"created_by_user_id": "user_01EXAMPLE",
"created_at": "2026-08-24T10:00:00Z",
"updated_at": "2026-08-24T10:00:00Z"
}Pronunciation Dictionaries
Update a pronunciation dictionary
Partial update. Any field you send replaces the stored value; sending entries replaces the whole list, and description: "" clears the note. Scope pronunciation_dictionary:write (admins only).
PATCH
/
pronunciation-dictionaries
/
{dictionary_id}
Update a pronunciation dictionary
curl --request PATCH \
--url https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id} \
--header 'Content-Type: application/json' \
--header 'X-API-KEY: <api-key>' \
--data '
{
"entries": [
{
"grapheme": "Lehar",
"replacement": "luh-HAR",
"language": "en"
}
]
}
'import requests
url = "https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}"
payload = { "entries": [
{
"grapheme": "Lehar",
"replacement": "luh-HAR",
"language": "en"
}
] }
headers = {
"X-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {'X-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({entries: [{grapheme: 'Lehar', replacement: 'luh-HAR', language: 'en'}]})
};
fetch('https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_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.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_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([
'entries' => [
[
'grapheme' => 'Lehar',
'replacement' => 'luh-HAR',
'language' => 'en'
]
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-KEY: <api-key>"
],
]);
$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.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}"
payload := strings.NewReader("{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-API-KEY", "<api-key>")
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.patch("https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}")
.header("X-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lehar.ai/ca/api/v0/pronunciation-dictionaries/{dictionary_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entries\": [\n {\n \"grapheme\": \"Lehar\",\n \"replacement\": \"luh-HAR\",\n \"language\": \"en\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"id": "pd_01EXAMPLE",
"name": "Brand names",
"description": "How the agent should pronounce product and place names",
"entries": [
{
"grapheme": "Lehar",
"replacement": "luh-har",
"kind": "substitution",
"language": "en"
},
{
"grapheme": "Bengaluru",
"replacement": "beng-uh-loo-roo",
"kind": "substitution"
}
],
"entry_count": 2,
"created_by_user_id": "user_01EXAMPLE",
"created_at": "2026-08-24T10:00:00Z",
"updated_at": "2026-08-24T10:00:00Z"
}Authorizations
ApiKeyAuthBearerAuth
Path Parameters
Body
application/json
Response
Updated dictionary

