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.
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
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
}
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
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"
}
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
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"
}
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
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 a glossary
This endpoint allows you to delete glossaries. Note: This will also delete all entries in this glossary.
Request
curl -X DELETE https://api.elanlanguages.ai/v1/glossaries/1 \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}"
Import glossary from CSV
This endpoint allows you to create a new glossary from a CSV file. The CSV format should have language codes in the first row and term translations in subsequent rows.
CSV Format
- First row: language codes (e.g.,
en,de,fr) - First column: base/primary language
- Subsequent rows: term translations
Example CSV:
en,de,fr
car,Auto,voiture
house,Haus,maison
All imported terms default to 'preferred' term type.
Required form fields
- Name
file- Type
- file
- Description
The CSV file to import.
- Name
name- Type
- string
- Description
The name for the new glossary.
- Name
base_language- Type
- string
- Description
The base language code (must match the first column in the CSV).
Optional form fields
- Name
description- Type
- string
- Description
A description for the glossary.
Request
curl https://api.elanlanguages.ai/v1/glossaries/import \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}" \
-F "file=@glossary.csv" \
-F "name=Technical Glossary" \
-F "base_language=en" \
-F "description=Technical terms for product documentation"
Response
{
"glossary_id": 1,
"entries_imported": 150,
"terms_imported": 450,
"message": "Glossary imported successfully"
}
Import to existing glossary
This endpoint allows you to import entries from a CSV file into an existing glossary. The CSV format should match the glossary's base language in the first column.
CSV Format
- First row: language codes (e.g.,
en,de,fr) - First column: must match the glossary's base language
- Subsequent rows: term translations
Example CSV:
en,de,fr
car,Auto,voiture
house,Haus,maison
All imported terms default to 'preferred' term type. Duplicate terms (same term+language already in glossary) will be skipped.
Required form fields
- Name
file- Type
- file
- Description
The CSV file to import.
Request
curl https://api.elanlanguages.ai/v1/glossaries/1/import \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}" \
-F "file=@additional-terms.csv"
Response
{
"glossary_id": 1,
"entries_imported": 25,
"terms_imported": 75,
"duplicates_skipped": 5,
"message": "Import completed successfully"
}
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.
Optional attributes
- Name
source_language- Type
- string
- Description
The source language code of the text being analyzed.
- Name
provider- Type
- string
- Description
The AI provider to use for analysis (default: "openai").
Request
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.",
"source_language": "en",
"provider": "openai"
}'
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"
}
],
"analyzed_text": "The API provides a programming interface for developers.",
"glossary_id": 1
}
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
limit- Type
- integer
- Description
Maximum number of results to return (default: 50, max: 100).
- Name
offset- Type
- integer
- Description
Number of results to skip for pagination (default: 0).
Request
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",
"limit": 10,
"offset": 0
}'
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": 2,
"limit": 10,
"offset": 0
}