Glossary terms

Create, list, update, and delete glossary terms one at a time or in batches of up to 100.

A term is a source text in a source locale, with the wording it should take in each target locale. A term without translations is non-translatable: it stays exactly as written in every locale, which suits product and company names.

All routes use https://api.lingo.dev and API authentication. Reading terms needs read access to the glossary, and every write needs edit access; see permissions.

Term model #

json
{
  "id": "eyJsb2NhbGUiOiJlbiIsInRleHQiOiJ3b3Jrc3BhY2UifQ",
  "glossaryId": "gls_example",
  "locale": "en",
  "text": "workspace",
  "description": "A team's shared project area, not a desk or office",
  "translations": { "de": "Arbeitsbereich", "fr": "espace de travail" },
  "createdAt": "2026-11-23T17:40:56.676Z",
  "updatedAt": "2026-11-23T17:40:56.676Z"
}
FieldMeaning
idOpaque ID of the term within its glossary.
localeSource locale of text, or "*" for any source locale.
textNonempty source text. Together, locale and text identify the term: a glossary holds each pair once.
descriptionHint that tells translation which sense of the term is meant, or null.
translationsObject mapping each target locale to the required translation. {} makes the term non-translatable.

The ID is derived from locale and text. An update that changes either one returns the term with a new id, and the old ID then returns GlossaryTermNotFound. Store the ID from the latest response.

Locales are BCP 47 codes such as en, pt-BR, or zh-Hans. Translation keys must be specific locales, not "*". A target locale written in more than one script, such as zh, returns GlossaryTermTargetAmbiguous (422) with suggestions such as zh-Hans and zh-Hant.

A term with translations must use a source locale in the glossary's source coverage; otherwise the write returns GlossaryTermLocaleNotCovered (422). A translated term with locale: "*" therefore needs a glossary that covers every source locale.

Create a term #

http
POST /v2/glossaries/:glossaryId/terms
Content-Type: application/json
X-API-Key: YOUR_API_KEY
json
{
  "locale": "en",
  "text": "workspace",
  "description": "A team's shared project area, not a desk or office",
  "translations": { "de": "Arbeitsbereich", "fr": "espace de travail" }
}

locale, text, and translations are required; description is optional. The response is the created term. If the glossary already holds a term with the same locale and text, the request returns GlossaryTermsTaken (409); update that term instead.

Create terms in bulk #

http
POST /v2/glossaries/:glossaryId/terms/create-many
Content-Type: application/json
X-API-Key: YOUR_API_KEY
json
{
  "terms": [
    { "locale": "en", "text": "Acme", "description": "Company name", "translations": {} },
    { "locale": "en", "text": "invoice", "translations": { "de": "Rechnung", "fr": "facture" } }
  ]
}

terms holds 1 to 100 terms with the fields of a single create. The request is all or none: if one term is invalid or taken, the whole request fails and the glossary is unchanged. The response lists every saved term:

json
{ "created": [ { "id": "...", "text": "Acme", "...": "..." }, { "id": "...", "text": "invoice", "...": "..." } ] }

A term the glossary already holds with translations makes the request return GlossaryTermsTaken (409), whose texts names each such term. A term the glossary holds as non-translatable is replaced by the one you send and appears in created. More than 100 terms returns GlossaryTermsBatchTooLarge (422), and sending the same locale and text twice returns GlossaryTermsRepeated (422). Split larger imports into several requests.

List terms #

http
GET /v2/glossaries/:glossaryId/terms?limit=50&search=invoice
X-API-Key: YOUR_API_KEY
Query parameterMeaning
limitInteger from 1 to 100; defaults to 50.
cursorOpaque cursor from the previous page's meta.nextCursor.
searchMatches the source text, ignoring case.
sourceLocalesSource locales to include.
targetLocalesTarget locales a term must have an explicit translation for. * selects non-translatable terms.
typesTranslated, NonTranslatable, or both.

Repeat a parameter for several values, as in targetLocales=de&targetLocales=fr. Filters select terms but never trim them: each term carries all its translations.

json
{
  "data": [ { "id": "...", "text": "invoice", "...": "..." } ],
  "meta": {
    "nextCursor": "eyJsb2NhbGUiOiJlbiIsInRleHQiOiJpbnZvaWNlIn0",
    "filterOptions": { "sourceLocales": ["en"], "targetLocales": ["*", "de", "fr"] }
  }
}

To read every term, repeat the request with cursor set to meta.nextCursor and the same filters until nextCursor is null. A page can hold fewer than limit terms before the end, so rely on nextCursor rather than the page size. meta.filterOptions lists the source and target locales the whole glossary holds, regardless of filters, with * standing for non-translatable terms.

List the terms an engine applies to read the terms of every glossary attached to an engine at once.

Read, update, or delete one term #

http
GET /v2/glossaries/:glossaryId/terms/:id
PATCH /v2/glossaries/:glossaryId/terms/:id
DELETE /v2/glossaries/:glossaryId/terms/:id

PATCH takes any of locale, text, description, and translations, and returns the updated term:

json
{ "translations": { "de": "Arbeitsbereich", "fr": "espace de travail", "ja": "ワークスペース" } }

translations replaces the whole set, so include every translation to keep; {} makes the term non-translatable. description: null removes the hint. Changing locale or text to a pair the glossary already holds returns GlossaryTermsTaken (409).

DELETE returns HTTP 200 with an empty body. An unknown or outdated ID returns GlossaryTermNotFound (404).

Update or delete terms in bulk #

http
POST /v2/glossaries/:glossaryId/terms/update-many
Content-Type: application/json
json
{
  "terms": [
    { "id": "TERM_ID", "description": "A bill sent to a customer" },
    { "id": "OTHER_TERM_ID", "translations": { "de": "Bericht" } }
  ]
}

Each entry has an id and the fields of a single update. Unlike bulk creation, each term is saved on its own: the response has HTTP 200 and lists the saved terms in updated and the others in failed, each with its id and the problem that stopped it.

json
{
  "updated": [ { "id": "TERM_ID", "description": "A bill sent to a customer", "...": "..." } ],
  "failed": [
    {
      "id": "OTHER_TERM_ID",
      "error": {
        "type": "https://lingo.dev/docs/api/errors/glossary-term-not-found",
        "title": "Glossary term not found",
        "status": 404,
        "detail": "Glossary term OTHER_TERM_ID not found",
        "id": "OTHER_TERM_ID"
      }
    }
  ]
}
http
POST /v2/glossaries/:glossaryId/terms/delete-many
Content-Type: application/json
json
{ "ids": ["TERM_ID", "OTHER_TERM_ID"] }

The response lists the deleted IDs in deleted, and IDs the glossary does not hold in failed with GlossaryTermNotFound.

Both routes take 1 to 100 unique IDs. More returns GlossaryTermsBatchTooLarge (422) and a repeated ID returns GlossaryTermsRepeated (422); either rejects the whole request. Check failed even when the status is 200.

Term errors #

ProblemStatusCause
GlossaryTermNotFound404The ID is unknown, outdated after a change to locale or text, or not readable.
GlossaryTermsTaken409The glossary already holds a term with that locale and text.
GlossaryTermTranslationTaken409The glossary already holds the term's translation for that target locale.
GlossaryTermsCreatedConcurrently409Another request added one of the terms first. Retry to see which.
GlossaryTermLocaleNotCovered422A translated term's source locale is outside the glossary's source coverage.
GlossaryTermTargetAmbiguous422A target locale does not name a single script, such as zh.
GlossaryTermTextEmpty422The term's text is empty.
GlossaryTermsBatchTooLarge422A bulk request names more than 100 terms.
GlossaryTermsRepeated422A bulk request names the same term twice.