curl --request PUT \
--url https://api.deepl.com/v3/glossaries/{glossary_id}/dictionaries \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"source_lang": "en",
"target_lang": "de",
"entries": "Hello\tGuten Tag",
"entries_format": "tsv"
}
'{
"source_lang": "EN",
"target_lang": "DE",
"entry_count": 1
}{
"message": "Invalid glossary entries provided",
"detail": "Key with the index 1 (starting at position 13) duplicates key with the index 0 (starting at position 0)"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}Replaces or creates a dictionary in the glossary with the specified entries.
Create a dictionary in a v3 multilingual glossary, or replace the entries in an existing one, for one language pair.
curl --request PUT \
--url https://api.deepl.com/v3/glossaries/{glossary_id}/dictionaries \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"source_lang": "en",
"target_lang": "de",
"entries": "Hello\tGuten Tag",
"entries_format": "tsv"
}
'{
"source_lang": "EN",
"target_lang": "DE",
"entry_count": 1
}{
"message": "Invalid glossary entries provided",
"detail": "Key with the index 1 (starting at position 13) duplicates key with the index 0 (starting at position 0)"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}{
"message": "<string>",
"code": "invalid_content_type"
}Authorizations
Body
The dictionary to insert into (or overwrite in) the multilingual glossary.
The language in which the target texts in the dictionary are specified. Besides the base languages, the
target can be one of these variants: de-CH, de-DE, en-GB, en-US, es-419, es-ES, fr-CA,
fr-FR, pt-BR, pt-PT, zh-Hans, or zh-Hant. Source languages are always base languages. The current
list is returned by GET /v3/languages?resource=glossary.
A dictionary with a base target, such as de, applies when translating into that language and any of its
variants. A dictionary with a variant target, such as de-CH, applies only when translating into that
exact variant.
Within one glossary, each language family uses either the base language or its variants as targets, not
both. For example, de-CH and de-DE can be combined, but de and de-DE cannot. Adding a dictionary
that breaks this rule returns a 400 error.
ar, bg, cs, da, de, de-CH, de-DE, el, en, en-GB, en-US, es, es-419, es-ES, et, fi, fr, fr-CA, fr-FR, he, hu, id, it, ja, ko, lt, lv, nb, nl, pl, pt, pt-BR, pt-PT, ro, ru, sk, sl, sv, tr, uk, vi, zh, zh-Hans, zh-Hant "de"
The format in which the glossary entries are provided. Formats currently available:
tsv(default) - tab-separated valuescsv- comma-separated values
See Supported Glossary Formats for details about each format.
tsv, csv "tsv"
Response
JSON object containing the dictionary meta-information.
The language in which the target texts in the dictionary are specified. Besides the base languages, the
target can be one of these variants: de-CH, de-DE, en-GB, en-US, es-419, es-ES, fr-CA,
fr-FR, pt-BR, pt-PT, zh-Hans, or zh-Hant. Source languages are always base languages. The current
list is returned by GET /v3/languages?resource=glossary.
A dictionary with a base target, such as de, applies when translating into that language and any of its
variants. A dictionary with a variant target, such as de-CH, applies only when translating into that
exact variant.
Within one glossary, each language family uses either the base language or its variants as targets, not
both. For example, de-CH and de-DE can be combined, but de and de-DE cannot. Adding a dictionary
that breaks this rule returns a 400 error.
ar, bg, cs, da, de, de-CH, de-DE, el, en, en-GB, en-US, es, es-419, es-ES, et, fi, fr, fr-CA, fr-FR, he, hu, id, it, ja, ko, lt, lv, nb, nl, pl, pt, pt-BR, pt-PT, ro, ru, sk, sl, sv, tr, uk, vi, zh, zh-Hans, zh-Hant "de"