openapi: 3.0.0
info:
  version: '1.0.6'
  title: API V2
  description: Connect your software to POEditor with this simple API
servers:
  - url: https://api.poeditor.com/v2
    description: Base Server
paths:
  /projects/list:
    post:
      operationId: projectsList
      summary: Returns the list of projects owned by user.
      description: "List Projects. More details in the [documentation](https://poeditor.com/docs/api#projects_list)."
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/Authentication'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectListResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: OK
                    result:
                      projects:
                        - id: 4886
                          name: Twentytwelve
                          public: 0
                          open: 0
                          created: 2013-04-12T09:24:42+0000
                        - id: 4537
                          name: Contact Form
                          public: 0
                          open: 0
                          created: 2013-04-02T23:00:06+0000
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/view:
    post:
      operationId: projectsView
      summary: Returns projects details
      description: 'View Project Details. More details in the [documentation](https://poeditor.com/docs/api#projects_view).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectViewResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: OK
                    result:
                      project:
                        id: 7717
                        name: Automobile
                        description: Automobile
                        public: 0
                        open: 0
                        reference_language: fr
                        fallback_language: ''
                        terms: 783
                        created: 2013-07-04T17:44:37+0000
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/add:
    post:
      operationId: ProjectsAdd
      summary: 'Creates a new project. Returns project details (if successful).'
      description: 'Add Project. More details in the [documentation](https://poeditor.com/docs/api#projects_add).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                  required:
                    - name
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectViewResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: OK
                    result:
                      project:
                        id: 7717
                        name: Automobile
                        description: Automobile
                        public: 0
                        open: 0
                        reference_language: fr
                        fallback_language: ''
                        terms: 783
                        created: 2013-07-04T17:44:37+0000
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/update:
    post:
      operationId: projectsUpdate
      summary: 'Updates project settings (name, description, reference language, fallback language). If optional parameters are not sent, their respective fields are not updated.'
      description: 'Update Project Settings. More details in the [documentation](https://poeditor.com/docs/api#projects_update).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    name:
                      type: string
                    description:
                      type: string
                    reference_language:
                      type: string
                    fallback_language:
                      type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectViewResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: OK
                    result:
                      project:
                        id: 7717
                        name: Automobile
                        description: Automobile
                        public: 0
                        open: 0
                        reference_language: fr
                        fallback_language: ''
                        terms: 783
                        created: 2013-07-04T17:44:37+0000
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/delete:
    post:
      operationId: projectsDelete
      summary: 'Deletes the project from the account. You must be the owner of the project.'
      description: 'Delete Project. More details in the [documentation](https://poeditor.com/docs/api#projects_delete).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: 'Project was deleted: Automobile [7717]'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/upload:
    post:
      operationId: projectsUpload
      summary: 'Updates terms / translations - No more than one request every 20 seconds.'
      description: 'Upload. More details in the [documentation](https://poeditor.com/docs/api#projects_upload).'
      tags:
        - Projects
      requestBody:
        content:
          multipart/form-data:
            schema:
              example:
                api_token: a9824103d8729b923fbe1d268ec69ef9
                id: 7717
                updating: terms
                file: pathtofile/filename.po
                tags: '{"obsolete":"removed-strings"}'
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    updating:
                      type: string
                      enum:
                        - terms
                        - translations
                        - terms_translations
                    file:
                      type: string
                      format: binary
                      description: Uploaded file (.po, .xls or any of the supported file formats)
                    language:
                      type: string
                      description: The language code (Required only if `updating` is terms_translations or translations). When using `terms_translations` with `.xcstrings` file format, leave it empty to import all the languages in the file.
                    overwrite:
                      type: integer
                      description: Set it to 1 if you want to overwrite translations
                      enum:
                        - 0
                        - 1
                    sync_terms:
                      type: integer
                      description: Set it to 1 if you want to sync your terms (terms that are not found in the uploaded file will be deleted from project and the new ones added). Ignored if `updating` = translations.
                      enum:
                        - 0
                        - 1
                    tags:
                      type: string
                      description: 'Add tags to the project terms; available when updating terms or terms_translations; you can use the following keys: "all" - for the all the imported terms, "new" - for the terms which arent already in the project, "obsolete" - for the terms which are in the project but not in the imported file and "overwritten_translations" - for the terms for which translations change'
                    read_from_source:
                      type: integer
                      description: For .xliff format only - set it to 1 if you want to import translations from the source tag
                      enum:
                        - 0
                        - 1
                    fuzzy_trigger:
                      type: integer
                      description: Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
                      enum:
                        - 0
                        - 1
              required:
                - updating
                - file
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectUploadResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        added: 2
                        deleted: 2
                      translations:
                        parsed: 2
                        added: 2
                        deleted: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/sync:
    post:
      operationId: projectsSync
      summary: 'Syncs your project with the array you send (terms that are not found in the JSON object will be deleted from project and the new ones added). Please use with caution. If wrong data is sent, existing terms and their translations might be irreversibly lost.'
      description: 'Sync Terms. More details in the [documentation](https://poeditor.com/docs/api#projects_sync).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    data:
                      type: string
                      description: JSON format
                      example: '[{"term": "Add new list", "context": "", "reference": "\/projects", "plural": "", "comment": ""}, {"term": "one project found", "context": "", "reference": "\/projects", "plural": "%d projects found", "comment": "Make sure you translate the plural forms", "tags": ["first_tag", "second_tag"]}, {"term": "Show all projects", "context": "", "reference": "\/projects", "plural": "", "tags": "just_a_tag"}]'
                  required:
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectSyncResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: '200'
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        added: 2
                        updated: 2
                        deleted: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /projects/export:
    post:
      operationId: projectsExport
      summary: 'Returns the link of the file (expires after 10 minutes). The settings inherited from the project will be the ones at the time of the download.'
      description: 'Export. More details in the [documentation](https://poeditor.com/docs/api#projects_export).'
      tags:
        - Projects
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                    type:
                      type: string
                      enum:
                        - arb
                        - csv
                        - ini
                        - key_value_json
                        - i18next
                        - json
                        - po
                        - pot
                        - mo
                        - properties
                        - resw
                        - resx
                        - ts
                        - apple_strings
                        - xliff
                        - xliff_1_2
                        - xlf
                        - xmb
                        - xtb
                        - rise_360_xliff
                        - xls
                        - xlsx
                        - android_strings
                        - yml
                        - php
                    filters:
                      type: string
                      example: '["translated", "not_fuzzy"]'
                    order:
                      type: string
                      example: 'terms'
                    tags:
                      type: string
                      example: '["name-of-tag", "name-of-another-tag"]'
                    options:
                      type: string
                      enum:
                        - '[{"unquoted": 1}]'
                        - '[{"unencoded": 1}]'
                        - '[{"export_all": 1}]'
                  required:
                    - language
                    - type
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProjectExportResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: OK
                    result:
                      url: 'https://api.poeditor.com/v2/download/file/b577a66ac39d82995debfabc016f855d'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /languages/available:
    post:
      operationId: projectsAvailable
      summary: 'Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.'
      description: 'List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_available).'
      tags:
        - Languages
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguagesListShortResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: OK
                    result:
                      languages:
                        - name: Yoruba
                          code: yo
                        - name: Akan
                          code: ak
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /languages/list:
    post:
      operationId: languagesList
      summary: 'Returns project languages, percentage of translation done for each and the datetime (UTC - ISO 8601) when the last change was made.'
      description: 'List Languages. More details in the [documentation](https://poeditor.com/docs/api#languages_list).'
      tags:
        - Languages
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LanguagesListLongResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: OK
                    result:
                      languages:
                        - name: Yoruba
                          code: yo
                          translations: 13
                          percentage: 12.5
                          updated: 015-05-04T14:21:41+0000
                        - name: Akan
                          code: ak
                          translations: 5
                          percentage: 7
                          updated: 2015-04-30T08:59:34+0000
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /languages/add:
    post:
      operationId: languagesAdd
      summary: Adds a new language to project.
      description: 'Add Language to Project. More details in the [documentation](https://poeditor.com/docs/api#languages_add).'
      tags:
        - Languages
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                  required:
                    - language
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'Language was added: Yoruba [yo]'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /languages/update:
    post:
      operationId: languagesUpdate
      summary: Inserts / overwrites translations.
      description: 'Update Project Language. More details in the [documentation](https://poeditor.com/docs/api#languages_update).'
      tags:
        - Languages
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                      description: The language code
                    fuzzy_trigger:
                      type: integer
                      description: Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
                      enum:
                        - 0
                        - 1
                    data:
                      type: string
                      description: JSON format
                      example: '[{"term": "%d Projects available", "context": "project list", "translation": {"content": {"one": "Un projet disponible", "other": "%d Projets disponibles"}, "fuzzy": 1}}]'
                  required:
                    - language
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationsShortResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'Language was added: Yoruba [yo]'
                    result:
                      translations:
                        parsed: 2
                        added: 2
                        updated: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /languages/delete:
    post:
      operationId: languagesDelete
      summary: Deletes existing language from project.
      description: 'Delete Language from Project. More details in the [documentation](https://poeditor.com/docs/api#languages_delete).'
      tags:
        - Languages
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                  required:
                    - language
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'Language was deleted: Yoruba [yo]'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /terms/list:
    post:
      operationId: termsList
      summary: Returns project's terms and translations if the argument language is provided.
      description: 'List Project Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_list).'
      tags:
        - Terms
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                      description: The language code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermsListFullResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      terms:
                        - term: 'app_name'
                          context: ''
                          plural: ''
                          created: 2013-06-10T11:08:54+0000
                          updated: ''
                          translation:
                            content: 'TODO List'
                            fuzzy: 0
                            proofread: 0
                            updated: 2013-06-12T11:08:54+0000
                          reference: ''
                          tags:
                            - first_upload
                            - second_upload
                          comment: 'Dont translate the name of the app'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /terms/add:
    post:
      operationId: termsAdd
      summary: Adds terms to project.
      description: 'Add Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_add).'
      tags:
        - Terms
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "Add new list", "context": "", "reference": "\/projects", "plural": "", "comment": ""}, {"term": "one project found", "context": "", "reference": "\/projects", "plural": "%d projects found", "comment": "Make sure you translate the plural forms", "tags": ["first_tag", "second_tag"]}, {"term": "Show all projects", "context": "", "reference": "\/projects", "plural": "", "tags": "just_a_tag"}]'
                  required:
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermAddedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        added: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /terms/update:
    post:
      operationId: termsUpdate
      summary: Updates project terms. Lets you change the text, context, reference, plural and tags.
      description: 'Update Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_update).'
      tags:
        - Terms
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "Add new list", "context": "", "new_term": "Save list", "new_context": "", "reference": "\/projects", "plural": "", "comment": "", "tags": ["first_tag", "second_tag"]}, {"term": "Display list", "context": "", "new_term": "Show list", "new_context": ""}]'
                    fuzzy_trigger:
                      type: integer
                      description: Set it to 1 to mark corresponding translations from the other languages as fuzzy for the updated values
                      enum:
                        - 0
                        - 1
                  required:
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermUpdatedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        updated: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /terms/delete:
    post:
      operationId: termsDelete
      summary: Deletes terms from project.
      description: 'Delete Terms. More details in the [documentation](https://poeditor.com/docs/api#terms_delete).'
      tags:
        - Terms
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "one project found", "context": ""}, {"term": "Show all projects", "context": "form"}]'
                  required:
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermDeletedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        deleted: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /terms/add_comment:
    post:
      operationId: termsAddComment
      summary: Adds comments to existing terms.
      description: 'Add Comment. More details in the [documentation](https://poeditor.com/docs/api#terms_add_comment).'
      tags:
        - Terms
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "Add new list", "context": "", "comment": "This is a button", "pinned": 1}, {"term": "one project found", "context": "", "comment": "Make sure you translate the plural forms", "pinned": 0}, {"term": "Show all projects", "context": "", "comment": "This is a button"}]'
                  required:
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TermAddCommentResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      terms:
                        parsed: 2
                        with_added_comment: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /translations/add:
    post:
      operationId: translationsAdd
      summary: Adds translations to project. If translation exists, it will not overwrite it.
      description: 'Add Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_add).'
      tags:
        - Translations
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                      description: 'The language code'
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "%d Projects available", "context": "project list", "translation": {"content": {"one": "Un projet disponible", "other": "%d Projets disponibles"}}}]'
                  required:
                    - language
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationAddedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      translations:
                        parsed: 2
                        added: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /translations/update:
    post:
      operationId: translationsUpdate
      summary: Updates existing translations.
      description: 'Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_update).'
      tags:
        - Translations
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                      description: 'The language code'
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "%d Projects available", "context": "project list", "translation": {"content": {"one": "Un projet disponible", "other": "%d Projets disponibles"}}}]'
                  required:
                    - language
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationUpdatedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      translations:
                        parsed: 2
                        updated: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /translations/delete:
    post:
      operationId: translationsDelete
      summary: Deletes translations from specified language.
      description: 'Delete Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_delete).'
      tags:
        - Translations
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    language:
                      type: string
                      description: 'The language code'
                    data:
                      type: string
                      description: 'JSON format'
                      example: '[{"term": "Projects", "context": "project list"}, {"term": "Languages", "context": ""}]'
                  required:
                    - language
                    - data
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationDeletedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      translations:
                        parsed: 2
                        deleted: 2
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /translations/automatic:
    post:
      operationId: translationsAutomatic
      summary: Updates existing translations.
      description: 'Update Translations. More details in the [documentation](https://poeditor.com/docs/api#translations_automatic).'
      tags:
        - Translations
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - $ref: '#/components/schemas/ID'
                - type: object
                  properties:
                    source_language:
                      type: string
                      description: 'The language code'
                    provider_source_language:
                      type: string
                      description: 'The language code'
                    provider:
                      type: string
                      enum:
                        - google
                        - microsoft
                        - deepl
                    target_languages:
                      type: string
                      description: 'A JSON of the languages to translate to'
                      example: '[{"project_language": "fr", "provider_language": "fr"}, {"project_language": "it", "provider_language": "it"}]'
                    options:
                      type: string
                      description: 'A JSON of the advanced options you want to use with the selected provider. Possible options include the POEditor tag of the strings you want to send for translation and some provider-specific options'
                      example: '{"tag": "new", "tag_handling": "html", "split_sentences": "0", "formality": "less"}'
                  required:
                    - source_language
                    - provider_source_language
                    - provider
                    - target_languages
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TranslationAutomatedResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      successful:
                        - source: "en"
                          target: "fr"
                          chars: 7
                        - source: "en"
                          target: "it"
                          chars: 7
                      failed:
                        - source: "en"
                          target: null
                          message: "Invalid pair."
                        - source: "en"
                          target: "ar"
                          message: "You don't have enough AT characters for this translation."
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /contributors/list:
    post:
      operationId: translationsList
      summary: Returns the list of contributors from your projects.
      description: 'List Contributors. More details in the [documentation](https://poeditor.com/docs/api#contributors_list).'
      tags:
        - Contributors
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - type: object
                  properties:
                    id:
                      type: string
                      description: 'The id of project (Optional, unless language is set. Then, it becomes required)'
                    language:
                      type: string
                      description: The language code
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ContributorsListResponse'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'OK'
                    result:
                      contributors:
                        - name: 'final test'
                          email: 'email@example.com'
                          permissions:
                            - project:
                                id: '4886'
                                name: 'Twentytwelve'
                              type: administrator
                              proofreader: true
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /contributors/add:
    post:
      operationId: contributorsAdd
      summary: Adds a contributor to a project language or an administrator to a project.
      description: 'Add Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_add).'
      tags:
        - Contributors
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - type: object
                  properties:
                    id:
                      type: string
                      description: 'The id of project'
                    name:
                      type: string
                      description: 'The name of contributor'
                    email:
                      type: string
                      description: 'The email of contributor'
                    language:
                      type: string
                      description: The language code (Required if adding a contributor)
                    admin:
                      type: integer
                      description: Set it to 1 for adding as administrator
                      enum:
                        - 0
                        - 1
                  required:
                    - id
                    - name
                    - email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'Contributor added.'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
  /contributors/remove:
    post:
      operationId: contributorsRemove
      summary: Removes a contributor from a project language or an admin from a project, if the language is not specified.
      description: 'Remove Contributor. More details in the [documentation](https://poeditor.com/docs/api#contributors_remove).'
      tags:
        - Contributors
      requestBody:
        content:
          application/x-www-form-urlencoded:
            schema:
              allOf:
                - $ref: '#/components/schemas/Authentication'
                - type: object
                  properties:
                    id:
                      type: string
                      description: 'The id of project'
                    email:
                      type: string
                      description: 'The email of contributor'
                    language:
                      type: string
                      description: The language code (Required if removing a contributor from a certain language)
                  required:
                    - id
                    - email
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Response'
              examples:
                '200':
                  value:
                    response:
                      status: success
                      code: 200
                      message: 'Contributor removed.'
                '4011':
                  $ref: '#/components/examples/AuthenticationError'
components:
  schemas:
    Authentication:
      type: object
      properties:
        api_token:
          type: string
      required:
        - api_token
    ID:
      type: object
      properties:
        id:
          type: integer
      required:
        - id
    Response:
      type: object
      properties:
        response:
          type: object
          properties:
            status:
              type: string
            code:
              type: string
            message:
              type: string
    ProjectList:
      type: object
      properties:
        projects:
          type: array
          items:
            type: object
            properties:
              id:
                type: integer
              name:
                type: string
              public:
                type: integer
                enum:
                  - 0
                  - 1
              open:
                type: integer
                enum:
                  - 0
                  - 1
              created:
                type: string
    ProjectLong:
      type: object
      properties:
        project:
          type: object
          properties:
            id:
              type: integer
            name:
              type: string
            description:
              type: string
            public:
              type: integer
              enum:
                - 0
                - 1
            open:
              type: integer
              enum:
                - 0
                - 1
            reference_language:
              type: string
            fallback_language:
              type: string
            terms:
              type: integer
            created:
              type: string
    TermsShortAdded:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
    TermsShortUpdated:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            updated:
              type: integer
    TermsShortDeleted:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            deleted:
              type: integer
    TermsShortComment:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            with_added_comment:
              type: integer
    TermsLong:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
            deleted:
              type: integer
    TermsFull:
      type: object
      properties:
        terms:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
            updated:
              type: integer
            deleted:
              type: integer
    TermsListFullResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsListFull'
    TermsListFull:
      type: object
      properties:
        terms:
          type: array
          items:
            type: object
            properties:
              term:
                type: string
              context:
                type: string
              plural:
                type: string
              created:
                type: string
              updated:
                type: string
              translation:
                type: object
                properties:
                  content:
                    type: string
                  fuzzy:
                    type: integer
                  proofread:
                    type: integer
                  updated:
                    type: string
              reference:
                type: string
              tags:
                type: array
                items:
                  type: string
              comment:
                type: string
    TranslationsShort:
      type: object
      properties:
        translations:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
            updated:
              type: integer
    TranslationsShortAdded:
      type: object
      properties:
        translations:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
    TranslationsShortUpdated:
      type: object
      properties:
        translations:
          type: object
          properties:
            parsed:
              type: integer
            updated:
              type: integer
    TranslationsShortDeleted:
      type: object
      properties:
        translations:
          type: object
          properties:
            parsed:
              type: integer
            deleted:
              type: integer
    TranslationsShortAutomated:
      type: object
      properties:
        successful:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              target:
                type: string
              chars:
                type: integer
        failed:
          type: array
          items:
            type: object
            properties:
              source:
                type: string
              target:
                type: string
              message:
                type: string
    TranslationsLong:
      type: object
      properties:
        translations:
          type: object
          properties:
            parsed:
              type: integer
            added:
              type: integer
            deleted:
              type: integer
    LanguagesListShort:
      type: object
      properties:
        languages:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              code:
                type: string
    LanguagesListLong:
      type: object
      properties:
        languages:
          type: array
          items:
            type: object
            properties:
              name:
                type: string
              code:
                type: string
              translations:
                type: integer
              percentage:
                type: number
              updated:
                type: string
    ProjectListResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/ProjectList'
    ProjectViewResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/ProjectLong'
    TermsTranslationsResponse:
      allOf:
        - $ref: '#/components/schemas/TermsLong'
        - $ref: '#/components/schemas/TranslationsLong'
    ProjectUploadResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsTranslationsResponse'
    ProjectSyncResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsFull'
    ProjectExportResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              type: object
              properties:
                url:
                  type: string
    LanguagesListShortResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/LanguagesListShort'
    LanguagesListLongResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/LanguagesListLong'
    TranslationsShortResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TranslationsShort'
    TermAddedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsShortAdded'
    TermUpdatedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsShortUpdated'
    TermDeletedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsShortDeleted'
    TermAddCommentResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TermsShortComment'
    TranslationAddedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TranslationsShortAdded'
    TranslationUpdatedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TranslationsShortUpdated'
    TranslationDeletedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TranslationsShortDeleted'

    TranslationAutomatedResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              $ref: '#/components/schemas/TranslationsShortAutomated'
    ContributorsListResponse:
      allOf:
        - $ref: '#/components/schemas/Response'
        - type: object
          properties:
            result:
              type: object
              properties:
                contributors:
                  type: array
                  items:
                    type: object
                    properties:
                      name:
                        type: string
                      email:
                        type: string
                      permissions:
                        type: array
                        items:
                          type: object
                          properties:
                            project:
                              type: object
                              properties:
                                id:
                                  type: string
                                name:
                                  type: string
                            type:
                              type: string
                            proofreader:
                              type: boolean
  examples:
    AuthenticationError:
      value:
        response:
          status: fail
          code: "4011"
          message: Invalid API Token