Skip to content

Glossaries

A glossary is a set of terms with per-language definitions that can be linked to a translation request (via glossaryId) to enforce consistent terminology. See Glossary Terms for managing the terms inside a glossary.

Retrieves a paginated list of all glossaries for the organization.

Endpoint: GET /translation/glossaries

Parameter Type Required Description
page integer no Page number (default 1)
limit integer no Items per page, 1-100 (default 50)

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": [
{
"id": "cmglossary123",
"name": "Technical Terms",
"organizationId": "cmorg123",
"status": "OK",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-01-10T09:00:00.000Z",
"languages": [
{ "language": "en", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" },
{ "language": "de", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" }
],
"terms": []
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 1,
"totalPages": 1
}
}
Terminal window
curl -X GET "https://platform.algebras.ai/api/v1/translation/glossaries?page=1&limit=50" \
-H "X-Api-Key: your_api_key_here"

Creates a new glossary with the specified name and languages.

Endpoint: POST /translation/glossaries

Sent as JSON.

Field Type Required Description
name string yes Name of the glossary
languages array of strings yes Language codes the glossary covers

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmglossary123",
"name": "Technical Terms",
"organizationId": "cmorg123",
"status": "OK",
"createdAt": "2025-01-12T22:31:48.856Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"languages": [
{ "language": "en", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" },
{ "language": "es", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" },
{ "language": "fr", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
],
"terms": []
}
}
Terminal window
curl -X POST "https://platform.algebras.ai/api/v1/translation/glossaries" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Technical Terms",
"languages": ["en", "es", "fr"]
}'

Retrieves a specific glossary with all its terms and definitions.

Endpoint: GET /translation/glossaries/{id}

  • id: The glossary ID

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmglossary123",
"name": "Technical Terms",
"organizationId": "cmorg123",
"status": "OK",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-01-10T09:00:00.000Z",
"languages": [
{ "language": "en", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" },
{ "language": "de", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" }
],
"terms": [
{
"id": "cmterm123",
"glossaryId": "cmglossary123",
"translationFlag": true,
"createdAt": "2025-01-10T09:05:00.000Z",
"updatedAt": "2025-01-10T09:05:00.000Z",
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface", "caseSensitivity": "auto", "createdAt": "2025-01-10T09:05:00.000Z", "updatedAt": "2025-01-10T09:05:00.000Z" },
{ "language": "de", "term": "API", "definition": "Programmierschnittstelle", "caseSensitivity": "auto", "createdAt": "2025-01-10T09:05:00.000Z", "updatedAt": "2025-01-10T09:05:00.000Z" }
]
}
]
}
}
Terminal window
curl -X GET "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123" \
-H "X-Api-Key: your_api_key_here"

Updates a glossary’s name and/or languages.

Endpoint: PUT /translation/glossaries/{id}

  • id: The glossary ID

Sent as JSON. Both fields are optional — send only what you want to change.

Field Type Required Description
name string no New name for the glossary
languages array of strings no New array of language codes

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmglossary123",
"name": "Updated Technical Terms",
"organizationId": "cmorg123",
"status": "UPDATING",
"createdAt": "2025-01-10T09:00:00.000Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"languages": [
{ "language": "en", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" },
{ "language": "de", "createdAt": "2025-01-10T09:00:00.000Z", "updatedAt": "2025-01-10T09:00:00.000Z" },
{ "language": "fr", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
],
"terms": []
}
}
Terminal window
curl -X PUT "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"name": "Updated Technical Terms",
"languages": ["en", "de", "fr"]
}'

Deletes a glossary and all its terms and definitions.

Endpoint: DELETE /translation/glossaries/{id}

  • id: The glossary ID

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmglossary123"
}
}
Terminal window
curl -X DELETE "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123" \
-H "X-Api-Key: your_api_key_here"