Skip to main content
Glossary entries contain multiple translations of a single term and corresponding information. On this page, we’ll dive into the different glossary entry endpoints you can use to manage glossary entries programmatically. We’ll look at how to create, update, and delete glossary entries.

The glossary entry model

The glossary entry model acts as a container for the terms and definitions for a single entry in a glossary. It also contains a reference to the glossary it belongs to as well as the terms that make up the entry and information about when the entry was created and last updated. Think of an entry as a row in a spreadsheet with multiple columns containing the translated terms.

Properties

id
integer
Unique identifier for the glossary entry.
glossary_id
integer
The ID of the glossary the entry belongs to.
notes
string
An optional note for the glossary entry.
terms
array
The terms that make up the glossary entry. See the glossary term model for details.
created_at
timestamp
Timestamp of when the glossary entry was created.
updated_at
timestamp
Timestamp of when the glossary entry was last updated.

The glossary term model

A glossary term represents a single translation or variant within a glossary entry. Each entry can have multiple terms in different languages.

Properties

id
integer
Unique identifier for the glossary term.
entry_id
integer
The ID of the glossary entry the term belongs to.
term
string
The term text.
lang
string
The language code for the term (e.g., ‘en’, ‘de’, ‘fr’).
description
string
An optional description or definition of the term.
term_type
string
The type of term. Possible values: preferred (the recommended term to use) or forbidden (a term that should not be used).
alternative_term
string
An optional alternative form of the term.

List all glossary entries

GET /v1/glossaries/:glossary_id/entries This endpoint allows you to retrieve a paginated list of all the entries in a glossary. By default, a maximum of 50 entries are shown per page.

Optional query parameters

limit
integer
Maximum number of entries to return. Default: 50.
offset
integer
Number of entries to skip for pagination. Default: 0.
include_terms
boolean
Whether to include the terms for each entry in the response. Default: true.
curl -G https://api.elanlanguages.ai/v1/glossaries/1/entries \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -d include_terms=true
Response
{
  "entries": [
    {
      "id": 1,
      "glossary_id": 1,
      "notes": "Technical term",
      "created_at": "2025-12-11T15:06:14.512Z",
      "updated_at": "2025-12-11T15:06:14.512Z",
      "terms": [
        {
          "id": 1,
          "entry_id": 1,
          "term": "API",
          "lang": "en",
          "description": "Application Programming Interface",
          "term_type": "preferred",
          "alternative_term": null
        }
      ]
    }
  ],
  "total": 1,
  "limit": 50,
  "offset": 0
}

Create a glossary entry

POST /v1/glossaries/:glossary_id/entries This endpoint allows you to add a new empty entry to a glossary. You might want to use the Create glossary entry with terms endpoint instead to add a glossary entry with terms in a single request.

Optional attributes

notes
string
A note for the glossary entry.
curl https://api.elanlanguages.ai/v1/glossaries/1/entries \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{"notes": "Technical term"}'
Response
{
  "id": 1,
  "glossary_id": 1,
  "notes": "Technical term",
  "created_at": "2025-12-11T15:06:14.512Z",
  "updated_at": "2025-12-11T15:06:14.512Z",
  "terms": []
}

Create a glossary entry with terms

POST /v1/glossaries/:glossary_id/entries/with-terms This endpoint allows you to add a new entry to a glossary with terms in a single request.

Optional attributes

notes
string
A note for the glossary entry.

Required attributes

terms
array
required
An array of term objects to create. Each term requires term, lang, and term_type.

Term object attributes

term
string
required
The term text.
lang
string
required
The language code for the term.
term_type
string
required
The type of term: preferred or forbidden.
description
string
An optional description of the term.
alternative_term
string
An optional alternative form of the term.
curl https://api.elanlanguages.ai/v1/glossaries/1/entries/with-terms \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{
    "notes": "Technical term",
    "terms": [
      {
        "term": "API",
        "lang": "en",
        "description": "Application Programming Interface",
        "term_type": "preferred"
      },
      {
        "term": "Schnittstelle",
        "lang": "de",
        "description": "Programmierschnittstelle",
        "term_type": "preferred"
      }
    ]
  }'
Response
{
  "id": 1,
  "glossary_id": 1,
  "notes": "Technical term",
  "created_at": "2025-12-11T15:06:14.512Z",
  "updated_at": "2025-12-11T15:06:14.512Z",
  "terms": [
    {
      "id": 1,
      "entry_id": 1,
      "term": "API",
      "lang": "en",
      "description": "Application Programming Interface",
      "term_type": "preferred",
      "alternative_term": null
    },
    {
      "id": 2,
      "entry_id": 1,
      "term": "Schnittstelle",
      "lang": "de",
      "description": "Programmierschnittstelle",
      "term_type": "preferred",
      "alternative_term": null
    }
  ]
}

Retrieve a glossary entry

GET /v1/glossaries/:glossary_id/entries/:entry_id This endpoint allows you to retrieve a glossary entry by providing its id.

Optional query parameters

include_terms
boolean
Whether to include the terms for the entry in the response. Default: true.
curl https://api.elanlanguages.ai/v1/glossaries/1/entries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -G -d include_terms=true
Response
{
  "id": 1,
  "glossary_id": 1,
  "notes": "Technical term",
  "created_at": "2025-12-11T15:06:14.512Z",
  "updated_at": "2025-12-11T15:06:14.512Z",
  "terms": [
    {
      "id": 1,
      "entry_id": 1,
      "term": "API",
      "lang": "en",
      "description": "Application Programming Interface",
      "term_type": "preferred",
      "alternative_term": null
    }
  ]
}

Update a glossary entry

PUT /v1/glossaries/:glossary_id/entries/:entry_id This endpoint allows you to update a glossary entry. You can update the notes and/or the terms. When updating terms, the lang field is used as the unique identifier within an entry:
  • If a term with the given lang exists, it will be updated
  • If no term with that lang exists, a new term will be created

Optional attributes

notes
string
Updated notes for the glossary entry.
terms
array
Array of term objects to update or create. Each term requires term, lang, and term_type.
curl -X PUT https://api.elanlanguages.ai/v1/glossaries/1/entries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{
    "notes": "Updated technical term",
    "terms": [
      {
        "term": "API",
        "lang": "en",
        "description": "Application Programming Interface",
        "term_type": "preferred"
      }
    ]
  }'
Response
{
  "id": 1,
  "glossary_id": 1,
  "notes": "Updated technical term",
  "created_at": "2025-12-11T15:06:14.512Z",
  "updated_at": "2025-12-11T16:30:00.000Z",
  "terms": [
    {
      "id": 1,
      "entry_id": 1,
      "term": "API",
      "lang": "en",
      "description": "Application Programming Interface",
      "term_type": "preferred",
      "alternative_term": null
    }
  ]
}

Delete a glossary entry

DELETE /v1/glossaries/:glossary_id/entries/:entry_id This endpoint allows you to delete a glossary entry. This will also delete all terms associated with the entry.
curl -X DELETE https://api.elanlanguages.ai/v1/glossaries/1/entries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}"