Skip to main content

Glossaries API

Create and manage custom glossaries for translation.

Overview

Glossaries define custom translation mappings between source and target language terms for improved translation accuracy.

Endpoints

MethodEndpointDescription
POST/api/v4/glossariesCreate glossary
GET/api/v4/glossariesList glossaries
GET/api/v4/glossaries/{id}Get glossary
PATCH/api/v4/glossaries/{id}Update glossary
DELETE/api/v4/glossaries/{id}Delete glossary
GET/api/v4/glossaries/{id}/entriesGet glossary entries as CSV
GET/api/v4/glossaries/supported-languagesGet supported language pairs

TypeScript Types

Glossary

type Glossary = {
id: number;
name: string;
description: string | null;
source_language: string;
target_language: string;
entry_count: number;
is_active: boolean;
deepl_glossary_id: string | null;
google_glossary_id: string | null;
organization_id: number;
created_at: string;
last_modified: string;
entries?: GlossaryEntry[];
};

GlossaryEntry

type GlossaryEntry = {
id: number;
source_term: string;
target_term: string;
};

GlossaryList

type GlossaryList = {
count: number;
total_results: number;
result: Glossary[];
};

LanguagePair

type LanguagePair = {
source_language: string;
target_language: string;
source_language_name: string;
target_language_name: string;
service: 'deepl' | 'google';
};

SupportedLanguagePairs

type SupportedLanguagePairs = {
language_pairs: LanguagePair[];
};

CreateGlossaryRequest

type CreateGlossaryRequest = {
name: string;
description?: string;
source_language: string;
target_language: string;
entries_csv: string;
};

UpdateGlossaryRequest

type UpdateGlossaryRequest = {
name?: string;
description?: string;
is_active?: boolean;
};

Request/Response Types

GlossaryListResponse

type GlossaryListResponse = {
data: GlossaryList;
};

GlossaryResponse

type GlossaryResponse = {
data: Glossary;
};

SupportedLanguagePairsResponse

type SupportedLanguagePairsResponse = {
data: SupportedLanguagePairs;
};

Notes

  • Glossaries are used for translation, not transcription
  • Entries are provided as CSV format in the entries_csv field when creating
  • The GET entries endpoint returns CSV text with Accept: text/csv header
  • Glossaries can integrate with DeepL or Google translation services
  • Language pairs must be supported by the translation service

Next Steps