> ## Documentation Index
> Fetch the complete documentation index at: https://developers.deepl.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create a glossary



## OpenAPI

````yaml post /v2/glossaries
openapi: 3.0.3
info:
  title: DeepL API Documentation
  description: >-
    The DeepL API provides programmatic access to DeepL’s language AI
    technology.


    Note: this OpenAPI spec is embedded into our API documentation and has
    shortened descriptions.
  termsOfService: https://www.deepl.com/pro-license
  contact:
    name: DeepL - Contact us
    url: https://www.deepl.com/contact-us
  version: 3.9.0
servers:
  - url: https://api.deepl.com
    description: DeepL API Pro
  - url: https://api-free.deepl.com
    description: DeepL API Free
security: []
tags:
  - name: beta
    description: >-
      Experimental features that are under testing and not yet intended for
      production use.
  - name: TranslateText
    description: >-
      The text-translation API currently consists of a single endpoint,
      `translate`, which is described below.
  - name: TranslateDocuments
    description: >-
      The document translation API allows you to translate whole documents and
      supports the following file types and extensions:
        * `docx` - Microsoft Word Document
        * `pptx` - Microsoft PowerPoint Document
        * `xlsx` - Microsoft Excel Document
        * `pdf` - Portable Document Format
        * `htm / html` - HTML Document
        * `txt` - Plain Text Document
        * `xlf / xliff` - XLIFF Document, version 2.1
        * `srt` - SRT Document
        * `jpeg` / `jpg` / `png` - Image (currently in beta)
  - name: RephraseText
    description: >-
      The `rephrase` endpoint  is used to make corrections and adjustments to
      texts based on style or tone.
  - name: ManageMultilingualGlossaries
    description: >-
      The *glossary* functions allow you to create, inspect, edit and delete
      glossaries.

      Glossaries created with the glossary function can be used in translate
      requests by specifying the

      `glossary_id` parameter. A glossary contains (several) dictionaries.

      A dictionary is a mapping of source phrases to target phrases for a single
      language pair.

      If you encounter issues, please let us know at support@DeepL.com.


      Currently you can create glossaries with any of the languages DeepL
      supports (with the exception of Thai).


      The maximum size limit for a glossary is 10 MiB = 10485760 bytes and each
      source/target text,

      as well as the name of the glossary, is limited to 1024 UTF-8 bytes.

      A total of 1000 glossaries are allowed per account.


      When creating a dictionary with target language `EN`, `PT`, or `ZH`, it's
      not necessary to specify a variant

      (e.g. `EN-US`, `EN-GB`, `PT-PT`, `PT-BR`, or `ZH-HANS`).

      Dictionaries with target language `EN` can be used in translations with
      either English variant.

      Similarly `PT`, and `ZH` dictionaries can be used in translations with
      their corresponding variants.

      (When you provide the ID of a glossary to a translation, the appropriate
      dictionary is automatically applied. Currently glossaries can not yet be
      used with source language detection.)


      Glossaries created via the DeepL API are now unified with glossaries
      created via the DeepL website and DeepL apps.

      Please only use the v3 glossary API in conjunction with multilingual or
      edited glossaries from the website.
  - name: ManageGlossaries
    description: >-
      Please note that this is the spec for the (old) v2 glossary endpoint.

      We recommend users switch to the newer v3 glossary endpoints, which
      support editability and multilinguality.


      The *glossary* functions allow you to create, inspect, and delete
      glossaries.

      Glossaries created with the glossary function can be used in translate
      requests by specifying the

      `glossary_id` parameter.

      If you encounter issues, please let us know at support@DeepL.com.


      Currently you can create glossaries with any of the languages DeepL
      supports (with the exception of Thai).
  - name: MetaInformation
    description: Information about API usage and value ranges
  - name: TranslationMemories
    description: >-
      The translation memory endpoints allow you to interact with your account's
      translation memories, used to store

      and reuse previously created translations. Translation memories can be
      used in text translation requests by

      specifying the `translation_memory_id` parameter to denote a specific
      translation memory and the

      `translation_memory_threshold` which defines the minimum matching
      percentage required for a translation memory

      segment to be applied (recommended to be 75% or higher).
  - name: VoiceAPI
    description: >-
      The Voice API provides real-time voice transcription and translation
      services.

      Use a two-step flow: first request a streaming URL via REST, then
      establish a WebSocket connection for streaming audio and receiving
      transcriptions.
  - name: VoiceTranslateJob
    description: >-
      **Alpha.** Async voice translation jobs. This API may change without
      notice.
externalDocs:
  description: DeepL Pro - Plans and pricing
  url: https://www.deepl.com/pro#developer
paths:
  /v2/glossaries:
    post:
      tags:
        - ManageGlossaries
      summary: Create a Glossary
      operationId: createGlossary
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateGlossaryParameters'
            examples:
              Basic:
                value:
                  name: My Glossary
                  source_lang: en
                  target_lang: de
                  entries: "Hello\tGuten Tag"
                  entries_format: tsv
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/CreateGlossaryParameters'
      responses:
        '201':
          description: >-
            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.
          headers:
            X-Trace-ID:
              $ref: '#/components/headers/X-Trace-ID'
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MonolingualGlossary'
        '400':
          $ref: '#/components/responses/BadRequestGlossaries'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/ForbiddenGlossaries'
        '404':
          $ref: '#/components/responses/NotFound'
        '413':
          $ref: '#/components/responses/PayloadTooLarge'
        '415':
          $ref: '#/components/responses/UnsupportedMediaTypeGlossaries'
        '429':
          $ref: '#/components/responses/TooManyRequests'
        '456':
          $ref: '#/components/responses/QuotaExceeded'
        '500':
          $ref: '#/components/responses/InternalServerError'
        '503':
          $ref: '#/components/responses/ServiceUnavailable'
        '529':
          $ref: '#/components/responses/TooManyRequests'
      security:
        - auth_header: []
components:
  schemas:
    CreateGlossaryParameters:
      type: object
      required:
        - name
        - source_lang
        - target_lang
        - entries
        - entries_format
      properties:
        name:
          description: Name to be associated with the glossary.
          type: string
          example: My Glossary
        source_lang:
          $ref: '#/components/schemas/GlossarySourceLanguage'
        target_lang:
          $ref: '#/components/schemas/GlossaryTargetLanguage'
        entries:
          type: string
          description: >-
            The entries of the glossary. The entries have to be specified in the
            format provided by the `entries_format` parameter.
          example: "Hello\tGuten Tag"
        entries_format:
          description: >-
            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](/api-reference/multilingual-glossaries#formats) for details
            about each format.
          type: string
          enum:
            - tsv
            - csv
          example: tsv
          default: tsv
    MonolingualGlossary:
      type: object
      properties:
        glossary_id:
          $ref: '#/components/schemas/GlossaryId'
        name:
          description: Name associated with the glossary.
          type: string
        ready:
          description: >-
            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.
          type: boolean
        source_lang:
          $ref: '#/components/schemas/GlossarySourceLanguage'
        target_lang:
          $ref: '#/components/schemas/GlossaryTargetLanguage'
        creation_time:
          description: >-
            The creation time of the glossary in the ISO 8601-1:2019 format
            (e.g.: `2021-08-03T14:16:18.329Z`).
          type: string
          format: date-time
        entry_count:
          description: The number of entries in the glossary.
          type: integer
      example:
        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
    GlossarySourceLanguage:
      type: string
      description: The language in which the source texts in the glossary are specified.
      enum:
        - 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
        - th
        - tr
        - uk
        - vi
        - zh
      example: en
    GlossaryTargetLanguage:
      type: string
      description: The language in which the target texts in the glossary are specified.
      enum:
        - 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
        - th
        - tr
        - uk
        - vi
        - zh
      example: de
    GlossaryId:
      type: string
      description: A unique ID assigned to a glossary.
      example: def3a26b-3e84-45b3-84ae-0c0aaf3525f7
  headers:
    X-Trace-ID:
      description: >-
        A unique identifier for the request that can be included in bug reports
        to DeepL support.
      schema:
        type: string
      example: 501c3d93cc0c4f11ae2f60a226c2f0f0
  responses:
    BadRequestGlossaries:
      description: Bad request. Please check error message and your parameters.
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                description: Generic description of the error.
                type: string
              detail:
                description: More specific description of the error.
                type: string
          example:
            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)
    Unauthorized:
      description: >-
        Authorization failed. Please supply a valid `DeepL-Auth-Key` via the
        `Authorization` header.
    ForbiddenGlossaries:
      description: >-
        Forbidden. The access to the requested resource is denied, because of
        insufficient access rights.
    NotFound:
      description: The requested resource could not be found.
    PayloadTooLarge:
      description: The request size exceeds the limit.
    UnsupportedMediaTypeGlossaries:
      description: >-
        The requested entries format specified in the `Accept` header is not
        supported.
    TooManyRequests:
      description: Too many requests. Please wait and resend your request.
    QuotaExceeded:
      description: Quota exceeded. The character limit has been reached.
    InternalServerError:
      description: Internal error.
    ServiceUnavailable:
      description: Resource currently unavailable. Try again later.
  securitySchemes:
    auth_header:
      type: apiKey
      description: >
        Authentication with `Authorization` header and  `DeepL-Auth-Key`
        authentication scheme. Example:  `DeepL-Auth-Key <api-key>`
      name: Authorization
      in: header
      x-default: 'DeepL-Auth-Key '

````