Glossaries

Glossaries are a powerful tool to make sure your translations are consistent and accurate. On this page, we'll dive into the different glossary endpoints you can use to manage glossaries programmatically. We'll look at how to create, update, and delete glossaries.

The glossary model

The glossary model contains metadata about your glossaries, such as their name, description, and base language. It also contains a reference to the entries in the glossary and information about when the glossary was created and last updated.

Properties

  • Name
    id
    Type
    integer
    Description

    Unique identifier for the glossary.

  • Name
    name
    Type
    string
    Description

    The name of the glossary.

  • Name
    description
    Type
    string
    Description

    An optional description of the glossary.

  • Name
    base_language
    Type
    string
    Description

    The base language for the glossary. All glossary entries need to contain at least a term in the base language.

  • Name
    is_active
    Type
    boolean
    Description

    Whether or not the glossary is active and can be used.

  • Name
    updated_at
    Type
    timestamp
    Description

    Timestamp of when the glossary was last updated.

  • Name
    created_at
    Type
    timestamp
    Description

    Timestamp of when the glossary was created.


GET/v1/glossaries

List all glossaries

This endpoint allows you to retrieve a paginated list of all your glossaries. By default, a maximum of 50 glossaries are shown per page.

Request

GET
/v1/glossaries
curl -G https://api.elanlanguages.ai/v1/glossaries \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}"

Response

{
  "glossaries": [
    {
      "id": 0,
      "name": "string",
      "description": "string",
      "base_language": "string",
      "is_active": true,
      "created_at": "2025-12-09T10:30:29.114Z",
      "updated_at": "2025-12-09T10:30:29.114Z"
    }
  ],
  "total": 0,
  "limit": 0,
  "offset": 0
}

POST/v1/glossaries

Create a glossary

This endpoint allows you to add a new glossary. To add a glossary, you must provide a name and base language.

Required attributes

  • Name
    name
    Type
    string
    Description

    The name for the glossary.

  • Name
    base_language
    Type
    string
    Description

    The base language for the glossary.

Optional attributes

  • Name
    description
    Type
    string
    Description

    A description for the glossary.

Request

POST
/v1/glossaries
curl https://api.elanlanguages.ai/v1/glossaries \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}"
  -d name="Standard Glossary" \
  -d base_language="en"

Response

{
  "id": 1,
  "name": "Standard Glossary",
  "description": "",
  "base_language": "en",
  "is_active": true,
  "created_at": "2025-12-09T10:34:41.135Z",
  "updated_at": "2025-12-09T10:34:41.135Z"
}

GET/v1/glossaries/:id

Retrieve a glossary

This endpoint allows you to retrieve a glossary by providing its id. Refer to the list at the top of this page to see which properties are included with glossary objects.

Request

GET
/v1/glossaries/1
curl https://api.elanlanguages.ai/v1/glossaries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}"

Response

{
  "id": 1,
  "name": "Standard Glossary",
  "description": "",
  "base_language": "en",
  "is_active": true,
  "created_at": "2025-12-09T10:34:41.135Z",
  "updated_at": "2025-12-09T10:34:41.135Z"
}

PUT/v1/glossaries/:id

Update a glossary

This endpoint allows you to perform an update on a glossary. All attributes are optional - only include the fields you want to update.

Optional attributes

  • Name
    name
    Type
    string
    Description

    The name for the glossary.

  • Name
    description
    Type
    string
    Description

    A description for the glossary.

  • Name
    base_language
    Type
    string
    Description

    The base language code for the glossary.

  • Name
    is_active
    Type
    boolean
    Description

    Whether or not the glossary is active and can be used.

Request

PUT
/v1/glossaries/1
curl -X PUT https://api.elanlanguages.ai/v1/glossaries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Standard Glossary",
    "description": "Standard Glossary for Acme Inc.",
    "is_active": false
  }'

Response

{
  "id": 1,
  "name": "Standard Glossary",
  "description": "Standard Glossary for Acme Inc.",
  "base_language": "en",
  "is_active": false,
  "created_at": "2025-12-09T10:39:04.329Z",
  "updated_at": "2025-12-09T10:39:04.329Z"
}

DELETE/v1/glossaries/:id

Delete a glossary

This endpoint allows you to delete glossaries. Note: This will also delete all entries in this glossary.

Request

DELETE
/v1/glossaries/1
curl -X DELETE https://api.elanlanguages.ai/v1/glossaries/1 \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}"

POST/v1/glossaries/:glossary_id/analyze

Analyze text against glossary

This endpoint allows you to analyze text against glossary terms using AI to find matches and violations. It returns matches (correctly used terms) and violations (forbidden terms used, preferred terms not used, etc.).

Required attributes

  • Name
    text
    Type
    string
    Description

    The text to analyze against the glossary.

  • Name
    language
    Type
    string
    Description

    The language code of the text being analyzed.

Optional attributes

  • Name
    target_language
    Type
    string
    Description

    The target language for translation context (optional).

Request

POST
/v1/glossaries/1/analyze
curl -X POST https://api.elanlanguages.ai/v1/glossaries/1/analyze \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "The API provides a programming interface for developers.",
    "language": "en",
    "target_language": "de"
  }'

Response

{
  "matches": [
    {
      "term": "API",
      "position": 4,
      "glossary_term_id": 1,
      "term_type": "preferred"
    }
  ],
  "violations": [
    {
      "term": "programming interface",
      "position": 22,
      "violation_type": "forbidden_term_used",
      "suggested_term": "API"
    }
  ],
  "analysis_score": 0.85
}

POST/v1/glossaries/search

Search glossary terms

This endpoint allows you to search for terms across all glossaries in your organization. Returns partial matches across all languages and glossaries with context.

Required attributes

  • Name
    query
    Type
    string
    Description

    The search query to find matching terms.

Optional attributes

  • Name
    language
    Type
    string
    Description

    Filter results by language code.

  • Name
    limit
    Type
    integer
    Description

    Maximum number of results to return (default: 50).

Request

POST
/v1/glossaries/search
curl -X POST https://api.elanlanguages.ai/v1/glossaries/search \
  -H "Authorization: Bearer {token}" \
  -H "X-Org-Id: {orgId}" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "interface",
    "language": "en",
    "limit": 10
  }'

Response

{
  "results": [
    {
      "term_id": 1,
      "term": "API",
      "lang": "en",
      "description": "Application Programming Interface",
      "term_type": "preferred",
      "glossary_id": 1,
      "glossary_name": "Technical Glossary",
      "entry_id": 1
    },
    {
      "term_id": 3,
      "term": "Interface",
      "lang": "en",
      "description": "An alternative term",
      "term_type": "forbidden",
      "glossary_id": 1,
      "glossary_name": "Technical Glossary",
      "entry_id": 1
    }
  ],
  "total_count": 2,
  "search_time_ms": 45
}

Was this page helpful?