Create a Versioned Dictionary With the DeepL Glossary API

When a translation pipeline uses approved terminology, treat its dictionary as versioned data. Keep the glossary name and API ID together so the test and production environments reference the intended version.

Worked example

JSON request body with two TSV entries

{
  "name": "warehouse-test-v1",
  "dictionaries": [{
    "source_lang": "en", "target_lang": "de",
    "entries_format": "tsv",
    "entries": "packing table\tPacktisch\nloading dock\tLaderampe"
  }]
}

Steps

  1. Use a DeepL API test environment or credentials approved for development. Choose the API host for your plan and keep the key in an environment secret.
  2. Send the example payload to POST /v3/glossaries using the documented authorization header. Store the returned glossary ID and verify the reported language direction and entry count.
  3. Use that ID with the translation endpoint and pass the matching explicit source and target languages. Check how a controlled sentence comes back before changing the production ID.

What to check

  • The created dictionary should contain two entries. Do not reuse a glossary ID created for a different project or language pair.
  • Treat credential and language-pair errors differently. Inspect the response without logging authorization headers.

See the DeepL listing

References