Context Stores
Context stores are containers for organizing reference documents that support your translation workflows. They allow you to manage glossaries, style guides, and other contextual materials that help ensure consistent and accurate translations. On this page, we'll dive into the different context store endpoints you can use to manage context stores programmatically.
The context store model
The context store model contains metadata about your context stores, such as their key, name, and description. It also tracks when the store was created and last updated, and whether it's currently active.
Properties
- Name
id- Type
- integer
- Description
Unique identifier for the context store.
- Name
key- Type
- string
- Description
A URL-friendly unique key for the context store (lowercase letters, numbers, hyphens, underscores).
- Name
name- Type
- string
- Description
The display name of the context store.
- Name
description- Type
- string
- Description
An optional description of the context store's purpose.
- Name
is_active- Type
- boolean
- Description
Whether or not the context store is active and can be used.
- Name
document_count- Type
- integer
- Description
The number of documents in this context store.
- Name
created_at- Type
- timestamp
- Description
Timestamp of when the context store was created.
- Name
updated_at- Type
- timestamp
- Description
Timestamp of when the context store was last updated.
List all context stores
This endpoint allows you to retrieve a paginated list of all your context stores. By default, a maximum of 50 context stores are shown per page.
Optional parameters
- Name
limit- Type
- integer
- Description
Maximum number of context stores to return (default: 50).
- Name
offset- Type
- integer
- Description
Number of context stores to skip (default: 0).
- Name
is_active- Type
- boolean
- Description
Filter by active status.
- Name
order_by- Type
- string
- Description
Field to order by (default: "created_at").
- Name
order_desc- Type
- boolean
- Description
Order in descending order (default: true).
Request
curl -G https://api.elanlanguages.ai/v1/context \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}"
Response
{
"stores": [
{
"id": 1,
"key": "product-glossary",
"name": "Product Glossary",
"description": "Technical terms for product documentation",
"is_active": true,
"document_count": 0,
"created_at": "2025-12-21T10:30:29.114Z",
"updated_at": "2025-12-21T10:30:29.114Z"
}
],
"total": 1,
"limit": 50,
"offset": 0
}
Create a context store
This endpoint allows you to create a new context store. A context store acts as a container for context documents. The key must be URL-friendly (lowercase letters, numbers, hyphens, underscores).
Required attributes
- Name
key- Type
- string
- Description
A unique, URL-friendly key for the context store.
- Name
name- Type
- string
- Description
The display name for the context store.
Optional attributes
- Name
description- Type
- string
- Description
A description of the context store's purpose.
Request
curl https://api.elanlanguages.ai/v1/context \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}" \
-H "Content-Type: application/json" \
-d '{
"key": "product-glossary",
"name": "Product Glossary",
"description": "Technical terms for product documentation"
}'
Response
{
"id": 1,
"key": "product-glossary",
"name": "Product Glossary",
"description": "Technical terms for product documentation",
"is_active": true,
"document_count": 0,
"created_at": "2025-12-21T10:34:41.135Z",
"updated_at": "2025-12-21T10:34:41.135Z"
}
Retrieve a context store
This endpoint allows you to retrieve a context store by providing its ID. Refer to the list at the top of this page to see which properties are included with context store objects.
Request
curl https://api.elanlanguages.ai/v1/context/1 \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}"
Response
{
"id": 1,
"key": "product-glossary",
"name": "Product Glossary",
"description": "Technical terms for product documentation",
"is_active": true,
"document_count": 0,
"created_at": "2025-12-21T10:34:41.135Z",
"updated_at": "2025-12-21T10:34:41.135Z"
}
Update a context store
This endpoint allows you to perform an update on a context store. You can update the name, description, and active status.
Optional attributes
- Name
name- Type
- string
- Description
The display name for the context store.
- Name
description- Type
- string
- Description
A description of the context store.
- Name
is_active- Type
- boolean
- Description
Whether or not the context store is active.
Request
curl -X PUT https://api.elanlanguages.ai/v1/context/1 \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Product Glossary",
"description": "Comprehensive product terminology",
"is_active": true
}'
Response
{
"id": 1,
"key": "product-glossary",
"name": "Updated Product Glossary",
"description": "Comprehensive product terminology",
"is_active": true,
"document_count": 0,
"created_at": "2025-12-21T10:34:41.135Z",
"updated_at": "2025-12-21T10:39:04.329Z"
}
Delete a context store
This endpoint allows you to delete a context store. Note: This is a soft delete operation. By default, this will also delete all documents in the store and their associated S3 files.
Optional parameters
- Name
delete_documents- Type
- boolean
- Description
Whether to delete all documents in the store (default: true).
- Name
delete_s3_files- Type
- boolean
- Description
Whether to delete associated S3 files (default: true).
Request
curl -X DELETE https://api.elanlanguages.ai/v1/context/1 \
-H "Authorization: Bearer {token}" \
-H "X-Org-Id: {orgId}"