| French → | Spanish |
|---|---|
| belle | hermosa |
| delicieux | exquisito |
GET /v3/languages?resource=glossary.
Entry formats
Glossary entries are formatted as CSV (comma-separated values) or TSV (tab-separated values), one entry per line, source phrase first:CSV entries
- Fields containing double quotes or commas must be enclosed in double quotes
- A double quote inside a quoted field is escaped by doubling it (
"")
Create a glossary
SendPOST /v3/glossaries an array of one or more dictionaries. This example creates a glossary with an English → German dictionary and its reverse:
Example request
Example response
jq to embed the file contents in the request body:
Create a glossary from a CSV file
Use a glossary in a translation
Include theglossary_id in a /v2/translate or /v2/document request. You must also set source_lang: glossaries can’t yet be used with automatic source language detection.
Example request
Example response
EN applies when translating into EN-US and EN-GB alike, and must be created with the root code. See How to Apply Customizations to Language Variants.
The v3 endpoints handle glossary management only; translation itself stays on the v2 endpoints.
Edit a glossary
Two methods change an existing glossary, with different semantics:| Method | Scope | Behavior |
|---|---|---|
PUT /v3/glossaries/{id}/dictionaries | One dictionary | Creates the dictionary for the given language pair, or replaces it entirely if it exists |
PATCH /v3/glossaries/{id} | Whole glossary | Updates metadata like the name; entries passed for a language pair are merged into the existing dictionary |
PATCH renames a glossary and adds one entry to its English → German dictionary, keeping existing entries:
Example request
PUT or PATCH can change one dictionary. To change the same source phrase across multiple language pairs, make one call per dictionary.
Retrieve glossaries
GET /v3/glossarieslists all your glossaries with per-dictionary metadata (no entries)GET /v3/glossaries/{id}returns one glossary’s metadataGET /v3/glossaries/{id}/entriesreturns the entries of a single dictionary, selected viasource_langandtarget_langquery parameters. Entries are currently returned in TSV format only.
Delete glossaries
DELETE /v3/glossaries/{id}deletes the whole glossaryDELETE /v3/glossaries/{id}/dictionaries?source_lang=...&target_lang=...deletes a single dictionary
Limits and restrictions
- Each dictionary can contain up to 10 MB of entries; a glossary with five dictionaries can hold up to 50 MB in total
- The glossary name, each source phrase, and each target phrase can contain up to 1024 UTF-8 bytes
- Duplicate source entries are not allowed, and neither source nor target may be empty
- Entries must not contain control characters (such as
\tor\ninside a phrase), Unicode newlines, or leading/trailing whitespace - The number of glossaries per account is limited by your plan