Skip to content

Glossary Terms

Terms live inside a glossary and carry per-language definitions. A term with a definition in the source and target language of a translation request is eligible to be applied when that glossary is linked via glossaryId.

Each definition also has a caseSensitivity setting (auto, capitals, exact or ignore) that controls how the term counter treats letter case when it looks for that entry in a text. See Letter Case Matching.

Retrieves a paginated list of all terms for a specific glossary.

Endpoint: GET /translation/glossaries/{id}/terms

  • id: The glossary ID
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": "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" }
]
}
],
"pagination": {
"page": 1,
"limit": 50,
"total": 1,
"totalPages": 1
}
}
Terminal window
curl -X GET "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123/terms?page=1&limit=50" \
-H "X-Api-Key: your_api_key_here"

Creates a single term with definitions for one or more languages. All definitions belong to the same term.

Endpoint: POST /translation/glossaries/{id}/terms

  • id: The glossary ID

Sent as JSON.

Field Type Required Description
definitions array of objects yes Definitions for this term, one per language
definitions[].language string yes Language code
definitions[].term string yes The term text
definitions[].definition string yes Definition of the term
definitions[].caseSensitivity string no auto (default), capitals, exact or ignore. How the term counter treats letter case for this entry

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmterm123",
"glossaryId": "cmglossary123",
"translationFlag": true,
"createdAt": "2025-01-12T22:31:48.856Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface", "caseSensitivity": "auto", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" },
{ "language": "de", "term": "API", "definition": "Programmierschnittstelle", "caseSensitivity": "auto", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
]
}
}
Terminal window
curl -X POST "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123/terms" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface" },
{ "language": "de", "term": "API", "definition": "Programmierschnittstelle" }
]
}'

Creates multiple terms in one request, each with its own definitions.

Endpoint: POST /translation/glossaries/{id}/terms/bulk

  • id: The glossary ID

Sent as JSON.

Field Type Required Description
terms array of objects yes Terms to create
terms[].definitions array of objects yes Same shape as Create Term’s definitions

Success Response (200) — all terms created

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": [
{
"id": "cmterm123",
"glossaryId": "cmglossary123",
"translationFlag": true,
"createdAt": "2025-01-12T22:31:48.856Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface", "caseSensitivity": "auto", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
]
}
]
}

Partial Success Response (207)

{
"status": "partial_success",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"successful": [
{
"id": "cmterm123",
"glossaryId": "cmglossary123",
"translationFlag": true,
"createdAt": "2025-01-12T22:31:48.856Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface", "caseSensitivity": "auto", "createdAt": "2025-01-12T22:31:48.856Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
]
}
],
"failed": [
{ "index": 1, "error": "Definition validation failed", "details": "term is required" }
],
"successCount": 1,
"failedCount": 1
}
}
Terminal window
curl -X POST "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123/terms/bulk" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"terms": [
{ "definitions": [{ "language": "en", "term": "API", "definition": "Application Programming Interface" }] },
{ "definitions": [{ "language": "en", "term": "SDK", "definition": "Software Development Kit" }] }
]
}'

Retrieves a specific term with all its definitions.

Endpoint: GET /translation/glossaries/{id}/terms/{termId}

  • id: The glossary ID
  • termId: The term ID

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"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" }
]
}
}
Terminal window
curl -X GET "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123/terms/cmterm123" \
-H "X-Api-Key: your_api_key_here"

Updates a term’s definitions.

Endpoint: PUT /translation/glossaries/{id}/terms/{termId}

  • id: The glossary ID
  • termId: The term ID

Sent as JSON.

Field Type Required Description
definitions array of objects no Definitions to set. Each item requires language; term, definition and caseSensitivity are optional per item. Omitting caseSensitivity keeps the current value; auto resets it to the default

Success Response (200)

{
"status": "ok",
"timestamp": "2025-01-12T22:31:48.856Z",
"data": {
"id": "cmterm123",
"glossaryId": "cmglossary123",
"translationFlag": true,
"createdAt": "2025-01-10T09:05:00.000Z",
"updatedAt": "2025-01-12T22:31:48.856Z",
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface (updated)", "caseSensitivity": "auto", "createdAt": "2025-01-10T09:05:00.000Z", "updatedAt": "2025-01-12T22:31:48.856Z" }
]
}
}
Terminal window
curl -X PUT "https://platform.algebras.ai/api/v1/translation/glossaries/cmglossary123/terms/cmterm123" \
-H "X-Api-Key: your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"definitions": [
{ "language": "en", "term": "API", "definition": "Application Programming Interface (updated)" }
]
}'

Deletes a term and all its definitions.

Endpoint: DELETE /translation/glossaries/{id}/terms/{termId}

  • id: The glossary ID
  • termId: The term ID

Success Response (200)

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