Glossary API
The Glossary API provides full create, read, update, and delete access to your AI Agent’s Glossary. A glossary term is a word or phrase your AI Agent should recognize in an end user’s message. In custom mode, the AI Agent also restates the term using your preferred wording. Use the API to manage glossary terms programmatically instead of only through the dashboard.
Each term is addressed by a server-generated id. It also carries an external_id, your own identifier for the term, which is unique within the AI Agent. The CSV import matches on the external_id.
Endpoints
Five endpoints are available:
- List glossary terms (
GET /v2/glossary/): Returns the AI Agent’s glossary terms in cursor-paginated pages ordered byid. - Create a glossary term (
POST /v2/glossary/): Creates a term. Theexternal_idmust be unique within the AI Agent. - Get a glossary term (
GET /v2/glossary/{glossary_term_id}): Returns a single term by itsid. - Update a glossary term (
PATCH /v2/glossary/{glossary_term_id}): Partially updates a term. Only the fields included in the request body are changed; omitted fields keep their existing values. Sendnullto clear a nullable field. - Delete a glossary term (
DELETE /v2/glossary/{glossary_term_id}): Permanently deletes a term. Any availability rule attached to the term is deleted with it. This cannot be undone.
Fields
Translation modes
translation_mode decides what the AI Agent does when it detects one of the user_terms, and it changes which other fields are required.
custom: the AI Agent answers using the matchingai_agent_termswording. Requires at least oneuser_termsentry and at least oneai_agent_termsentry.default: the AI Agent only receives the term’sdefinitionas context, and its wording is unchanged. Requiresuser_termsin exactly one language, noai_agent_terms, and either adefinitionorvoice_detection_enabled.
A create request that does not satisfy the rules for its mode returns 400. This applies even though external_id is the only field the schema marks as required. On update, the merged term is validated as a whole, so a change that leaves it invalid for its mode is also rejected with 400.
Availability rules
availability_rules is a structured rule object with a match combinator (all or any) and a list of conditions. Each condition names a variable by its id, an operator, and usually a value:
Use the Variables API to find a variable’s id. An unknown variable id or a malformed rule returns 400, and the term is not written.
On create, omit the field or send null for no rule. On update, omit it to leave the current rule unchanged, send null to clear it, or send a rule to replace it.
Limits
Requests that exceed these limits are rejected:
A user_terms entry cannot contain a semicolon (;) - it separates multiple terms in the CSV import format.
Voice detection
voice_detection_enabled gives the term to the voice agent, which biases speech-to-text recognition toward it.
Enabling it requires all of the following, or the request returns 400:
- The AI Agent has a voice platform configured.
- No
user_termsentry is in Albanian (sq) or Indonesian (id). Ada transcribes those two languages through a different speech provider, so voice detection cannot be enabled for a term worded in them. - Every
user_termsentry uses characters supported in Voice.
Voice pronunciations
voice_pronunciations changes how the AI Agent speaks a term on a voice call. Each entry respells one written form for one language:
The written form is matched whole-word and case-insensitively, and the pronunciation is sent to text-to-speech in its place.
This is independent of voice_detection_enabled. Voice detection biases speech-to-text, so the AI Agent recognizes a term it hears; pronunciations change text-to-speech, so the AI Agent says a term correctly. Set either, both, or neither.
Each entry must satisfy all of the following, or the request returns 400:
termis at least 2 characters after surrounding whitespace is trimmed, and contains at least one letter or digit.pronunciationis not empty and does not contain an ampersand (&).termandpronunciationare each up to 100 characters, andlanguageup to 10.- Both
termandpronunciationuse characters supported in Voice. languageis enabled on the AI Agent. Matching is on the primary language, so anen-USentry belongs to an AI Agent configured foren.- No two entries share the same written form in the same language.
On update, voice_pronunciations replaces the whole list. Send null to clear it, or omit it to leave it unchanged.
Pagination
The list endpoint is cursor-paginated. Use the limit query parameter to set the page size, from 1 to 100; omit it to use the default of 25. To page through results, read meta.next_page_url from the response and replay it unchanged to fetch the next page. next_page_url is null on the last or empty page.
Conflicts
Creating or updating a term can return a 409 Conflict for one of two reasons:
- Duplicate
external_id(duplicate_resource): Theexternal_idis already used by another term in the AI Agent. - Limit reached (
conflict): On create, the write would exceed the AI Agent’s glossary term limit or its voice-term limit. On update, only the voice-term limit applies, because an update does not add a term.
Authentication
Requests are authenticated with a Bearer API key. The read endpoints require the glossary:read scope. Create, update, and delete require glossary:write. See Authentication for details on generating and using API keys.