Create a Glossary
curl --request POST \
--url https://api.deepl.com/v2/glossaries \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Glossary",
"source_lang": "en",
"target_lang": "de",
"entries": "Hello\tGuten Tag",
"entries_format": "tsv"
}
'{
"glossary_id": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7",
"ready": true,
"name": "My Glossary",
"source_lang": "en",
"target_lang": "de",
"creation_time": "2021-08-03T14:16:18.329Z",
"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"
}Glossaries v2
Create a glossary
Create a v2 glossary from a list of source and target term pairs for a single language pair.
Create a Glossary
curl --request POST \
--url https://api.deepl.com/v2/glossaries \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "My Glossary",
"source_lang": "en",
"target_lang": "de",
"entries": "Hello\tGuten Tag",
"entries_format": "tsv"
}
'{
"glossary_id": "def3a26b-3e84-45b3-84ae-0c0aaf3525f7",
"ready": true,
"name": "My Glossary",
"source_lang": "en",
"target_lang": "de",
"creation_time": "2021-08-03T14:16:18.329Z",
"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
application/jsonapplication/x-www-form-urlencoded
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.
Available options:
tsv, csv Example:
"tsv"
Response
The function for creating a glossary returns a JSON object containing the ID of the newly created glossary and a boolean flag that indicates if the created glossary can already be used in translate requests.