ManageGlossaries

Create a Glossary

Changed on

For new integrations we recommend POST /v3/glossaries, which supports multiple language pairs in a single glossary.

Create a glossary for one source and target language pair and return its glossary_id.

post/v2/glossaries

Request

  • Base URL
    https://api.deepl.com
  • URL
    https://api.deepl.com/v2/glossaries
  • Auth
    API key in header Authorization

Request body

namestring required

Name to be associated with the glossary.

source_lang'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fi' | 'fr' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh' required

The language in which the source texts in the glossary are specified.

target_lang'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fi' | 'fr' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh' required

The language in which the target texts in the glossary are specified.

entriesstring required

The entries of the glossary. The entries have to be specified in the format provided by the entries_format parameter.

entries_format'tsv' | 'csv' required

The format in which the glossary entries are provided. Formats currently available:

  • tsv (default) - tab-separated values
  • csv - comma-separated values

See Supported Glossary Formats for details about each format.

Example request

{
  "name": "My Glossary",
  "source_lang": "en",
  "target_lang": "de",
  "entries": "Hello\tGuten Tag",
  "entries_format": "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.

glossary_idstring

A unique ID assigned to a glossary.

namestring

Name associated with the glossary.

readyboolean

Indicates if the newly created glossary can already be used in translate requests. If the created glossary is not yet ready, you have to wait and check the ready status of the glossary before using it in a translate request.

source_lang'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fi' | 'fr' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh'

The language in which the source texts in the glossary are specified.

target_lang'ar' | 'bg' | 'cs' | 'da' | 'de' | 'el' | 'en' | 'es' | 'et' | 'fi' | 'fr' | 'he' | 'hu' | 'id' | 'it' | 'ja' | 'ko' | 'lt' | 'lv' | 'nb' | 'nl' | 'pl' | 'pt' | 'ro' | 'ru' | 'sk' | 'sl' | 'sv' | 'tr' | 'uk' | 'vi' | 'zh'

The language in which the target texts in the glossary are specified.

creation_timestring date-time

The creation time of the glossary in the ISO 8601-1:2019 format (e.g.: 2021-08-03T14:16:18.329Z).

entry_countinteger

The number of entries in the glossary.

Example response

{
  "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
}

Changes

    • breaking

      removed the enum value th of the request property (media type: application/json)

    • breaking

      removed the enum value th of the request property (media type: application/x-www-form-urlencoded)

    • breaking

      removed the enum value th of the request property (media type: application/json)

    • breaking

      removed the enum value th of the request property (media type: application/x-www-form-urlencoded)

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      added the media type application/json for the response with the status

    • info

      removed the th enum value from the response property for the response status

    • info

      removed the th enum value from the response property for the response status