/pronunciation-dictionariesCreate a dictionary for the workspace or for one agent, with its entries.
Create Dictionary
Creates a dictionary and its entries in one request, and returns it with its entries. Leave out agent_id for a workspace dictionary. Nothing is created if any entry is refused.
Request body
7namestringrequiredName of the dictionary, up to 255 characters.
descriptionstringoptionalOptional free-text description.
languagestringrequiredLanguage of the dictionary, one of the values an agent's
languageaccepts (for exampleenglishorfrench). The dictionary applies to the agents whose language is in the same language family.agent_idstringoptionalID of the agent the dictionary belongs to. Leave it out for a dictionary that applies to every agent of the workspace. The agent's language must be in the same language family as
language.entriesobject[]optionalThe words and their respellings, up to 1,000. Defaults to none.
entries[].graphemestringrequiredThe word as written, up to 100 characters, for example
Cocody. Several words are allowed (Côte d'Ivoire). Each word can appear once, case and apostrophe style ignored.entries[].phonemestringrequiredHow the voice should read it, up to 200 characters, for example
Ko-ko-di. Plain words only: no digits, no markup, nothing the speech cleanup would change.
Errors
3No agent of your workspace has this agent_id.
Check the ID with GET /agents, or leave agent_id out for a workspace dictionary.
The workspace (no agent_id), or this agent, already has a dictionary in this language family.
Replace the entries of the existing dictionary instead (PUT on its /entries); the error gives its id.
language is not an agent language; the agent speaks a language of another family; an entry is empty, too long, contains markup or a control character, or its respelling contains a digit or would be changed by the speech cleanup; a word appears twice.
The response names the word and the reason. Correct it and send the request again.
