openapi: 3.0.0

servers:
  - description: ${LW_ENVIRONMENT}
    url: ${LW_PROJECT_API_URL}

info:
  version: 1.5.0
  title: LanguageWire Project API
  description: |
    Based on simple REST principles, the LanguageWire Project API endpoints return JSON data directly from our Platform.
     You can consume them directly through HTTPS calls.<br/>

     The LanguageWire Project API endpoints are divided in groups as follows:<br/>

      | Group     | Endpoints |
      | ----------- | ----------- |
      | [**Basic endpoints**](/project-api/get-version/) | Get available data from our Platform, that will be of help when creating your project. <br/> [`/version`](/project-api/get-version/): Returns the current version number of the API.<br/> [`/workareas`](/project-api/get-workareas/): To see the full list of available workareas that you can use for your project.<br/> [`/services`](/project-api/get-services/): To access to the full list of available services, the Platform offers. Example: Localisation, SEO, etc.<br/> [`/languages`](/project-api/get-languages/): To see the full list of available language pairs that you can use for your project.<br/> [`/languages/mt-pairs`](/project-api/get-mt-languages/): To retrieve the full list of available Machine Translation language pairs.<br/> **Basic endpoints retrieve the same data for all the users as this is pulled from LanguageWire Platform*|
      | [**Account**](/project-api/get-translation-memories/) | Retrieve private information associated to your LanguageWire account such as:<br/> [`/translation-memories`](/project-api/get-translation-memories/): To access to the full list of available Translation Memories registered on your company's account. <br/> [`/translation-memories-sets`](/project-api/get-translation-memory-sets/): To check the Translation Memory Sets with all the options you have at your disposal. <br/> [`/term-bases`](/project-api/get-term-bases/): To access to the full list of available Term Bases registered on your company's account. <br/> [`/invoicing-accounts`](/project-api/get-invoicing-accounts/): To retrieve the list of invoicing accounts associated to your company.<br/> [`/users`](/project-api/get-users/): To see the list of active users in your account. <br/> [`/project-templates`](/project-api/get-project-templates/): To get the full list of pre-configured templates in your account. |
      | [**Project**](/project-api/create-project/) | Use these endpoints to handle your translation project: <br/> [`POST /projects`](/project-api/create-project/): To start creating your project. <br/> [`GET /projects`](/project-api/get-projects/): To retrieve the full list of projects.<br/> [`GET /projects/:id`](/project-api/get-project/): To see specific details for the selected project. <br/> [`POST /projects/:id/do-start`](/project-api/start-project/): To send your project to our Platform for translation. <br/> [`POST /projects/:id/do-quote`](/project-api/start-project-as-a-quote/): To send your project to our Platform for translation as a quote. <br/> [`DELETE /projects/:id`](/project-api/cancel-project/): To remove the project if needed.<br/>   |
      | [**Files**](/project-api/add-source-file/) | Use these endpoints to manage the files in your translation project: <br/> [`POST /projects/:id/files`](/project-api/add-source-file/): To include the file or document that needs to be translated in to your project.<br/> [`GET /projects/:id/files/:fileId`](/project-api/download-file/): To download the already translated file. <br/> [`DELETE /projects/:id/files/:fileId`](/project-api/delete-file/): To delete the already translated file.<br/> [`GET /projects/:id/files/:fileId/metadata`](/project-api/get-file-metadata/): To see metadata of the specific file. <br/> Reference files:<br/> [`POST /projects/:id/reference-files`](/project-api/add-reference-file/): To include images, HTML, links, etc. for context to our experts.<br/> [`GET /projects/:id/reference-files/:fileId`](/project-api/download-reference-file/): To download the reference file.<br/> [`DELETE /projects/:id/reference-files/:fileId`](/project-api/delete-reference-file/): To remove the reference file. <br/> [`GET /projects/:id/reference-files/:fileId/metadata`](/project-api/get-reference-file-metadata/): To get the metadata of the reference file. |

    :::tip Tip
    For all the GET requests you can use [pagination and filters](/project-api/api-design/formats/), for a quicker search and arrange. <br/>
    :::
    <br/>

    :::note Note
    - Basic endpoints retrieve the same information for all the users.<br/>
    - Private data registered in your LanguageWire Platform account is configured by our Project Managers. <br/>

    <a href="https://www.languagewire.com/en/contact" target="_blank">📧 Contact us</a> for more information about how to register your account in LanguageWire Platform.
    :::

paths:
  # BASIC ENDPOINTS

  /version:
    get:
      tags:
        - Basic endpoints
      summary: Get version
      description: Use this basic endpoint to get the current version number of our Project API. This follows the standards set in the [semantic versioning schema](/project-api/api-design/formats/#semantic-versioning).
      operationId: Version_GetVersion
      responses:
        "200":
          description: Semantic version of the current API
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Version"
              example:
                version: "1.1.0"
                branchName: null
        "500":
          $ref: "#/components/responses/InternalServerError"

  /workareas:
    get:
      tags:
        - Basic endpoints
      summary: Get workareas
      operationId: Workareas_GetWorkareas
      description: |
        Gets the full list of workareas that are available in LanguageWire Platform.
        > **Not sure what a workarea is?** Check it out in our [glossary](/project-api/support/glossary/).
        :::info Info
        Pay attention to the list, as you will need to specify which workarea fits your content best when [creating your translation project](/project-api/create-project/).
        :::
        <br/>
      responses:
        "200":
          description: Available workareas
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdAndName"
              example:
                - id: 1
                  name: "Science - Genetics"
                - id: 2
                  name: "Science - Immigration"
        "500":
          $ref: "#/components/responses/InternalServerError"

  /services:
    get:
      tags:
        - Basic endpoints
      summary: Get services
      description: |
        Gets the full list of <a href="https://www.languagewire.com/en/services/" target="_blank"> available services</a> in LanguageWire Platform. Some examples are: translation, SEO, proofreading, validation, subtitling, etc.<br/>
        :::info
        Pay attention to the list, as you will need to specify which service (or services) you need for your contents when [creating your project](/project-api/create-project/).
        :::
        <br/>
      operationId: Services_GetServices
      responses:
        "200":
          description: Available services
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdAndName"
              example:
                - id: 1
                  name: "Translation"
                - id: 2
                  name: "Translation + Validation"
        "500":
          $ref: "#/components/responses/InternalServerError"

  /languages:
    get:
      tags:
        - Basic endpoints
      summary: Get languages
      description: |
        Gets the full list of available languages in LanguageWire Platform.<br/>
        - This list follows the language tags schema set in the [BCP 47 standard](https://en.wikipedia.org/wiki/IETF_language_tag). <br/>
        - See all details in the [API design-formats section](/project-api/api-design/formats/#languages).

        :::info
        Pay attention to the list, as you will need to specify which source and target languages codes you need for your content when [adding files](/project-api/add-source-file/) to your project.
        :::
        <br/>
      operationId: Languages_GetLanguages
      responses:
        "200":
          description: Available languages
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/Language"
              example:
                - languageCode: "en-GB"
                  languageName: "English (UK)"
                - languageCode: "es-ES"
                  languageName: "Spanish (Spain)"
                - languageCode: "de-DE"
                  languageName: "German (Germany)"
        "500":
          $ref: "#/components/responses/InternalServerError"

  /languages/mt-pairs:
    get:
      tags:
        - Basic endpoints
      summary: Get MT languages
      description: |
        This operation gets the list of all language pairs that are available for Machine Translation (MT). <br/>
        :::info
        Pay attention to the list, as you will need to specify which MT language pairs (source and target codes) you need for your contents when [adding files](/project-api/add-source-file/) to your project.
        :::
        <br/>

         * This list follows the language tags schema set in the [BCP 47 standard](https://en.wikipedia.org/wiki/IETF_language_tag). <br/>
         * See all details in the [API design-formats section](/project-api/api-design/formats/#languages).

        :::caution Caution
        The MT language pairs are **not equivalent** to the available languages in the Platform! <br/>
        Among all the available languages in the Platform, these are only the ones supported by Machine Translation.
        :::
        <br/>
      operationId: Languages_GetLanguagesMTPairs
      responses:
        "200":
          description: Available language pairs for Machine Translation
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/LanguagePair"
              example:
                - sourceLanguageCode: "en-GB"
                  targetLanguageCode: "es-ES"
                - sourceLanguageCode: "en-GB"
                  targetLanguageCode: "de-DE"
        "500":
          $ref: "#/components/responses/InternalServerError"

  /translation-memories:
    get:
      tags:
        - Account
      summary: Get translation memories
      description: |
        Gets all the Translation Memories (TMs) that have been predefined in your Platform account by LanguageWire Project Managers. <br/>
        :::info
        Pay attention to the list, as you will need to specify which Translation Memory you want us to apply on your content when [creating your project](/project-api/create-project/).
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your Translation Memory (s) to be updated and/or modified.
        :::
        <br/>

        > **_Not sure what a Translation Memory is?_** Check it out in our [glossary](/project-api/support/glossary/).

      operationId: Account_GetTranslationMemories
      responses:
        "200":
          description: Available translation memories in your Platform account
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdAndName"
              example:
                - id: 1
                  name: "My translation memories"
                - id: 2
                  name: "Another translation memory"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /translation-memory-sets:
    get:
      tags:
        - Account
      summary: Get translation memory sets
      description: |
        Gets all the Translation Memory Sets (Cascading TMs) that have been predefined in your Platform account by LanguageWire Project Managers. <br/>
        :::info
        Pay attention to the list, as you might need to specify which Translation Memory Set you want us to apply on your content when [creating your project](/project-api/create-project/).
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your Translation Memory Set to be updated and/or modified.
        :::
        <br/>

        > **_Not sure what a Translation Memory Set is?_** Check it out in our [glossary](/project-api/support/glossary/).

      operationId: Account_GetTranslationMemorySets
      responses:
        "200":
          description: Available translation memory sets in your Platform account
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/TranslationMemorySet"
              example:
                - id: 132
                  version: 1
                  name: "Marketing TM Set"
                  description: "Some description about the TM Set"
                  status: "Active"
                  deleted: false
                  createdOn: "2024-09-10T12:44:26Z"
                  translationMemoryFamilies:
                    - familyId: 94420
                      priority: 1
                      penalty: 0
                      read: true
                      write: false
                      concordance: true
                    - familyId: 104659
                      priority: 2
                      penalty: 2
                      read: true
                      write: true
                      concordance: true
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /term-bases:
    get:
      tags:
        - Account
      summary: Get term bases
      description: |
        Gets all the Term Bases (TBs) that have been predefined in your Platform account by LanguageWire Project Managers. <br/>
        :::info
        Pay attention to the list, as you could specify which Term Base you want us to apply on your content when [creating your project](/project-api/create-project/).
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your Term Base (s) to be updated and/or modified.
        :::
        <br/>

        > **_Not sure what a Term Base is?_** Check it out in our [glossary](/project-api/support/glossary/).

      operationId: Account_GetTermBases
      responses:
        "200":
          description: Available term bases in your Platform account
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdAndName"
              example:
                - id: 1
                  name: "My term base"
                - id: 2
                  name: "Another term base"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /invoicing-accounts:
    get:
      tags:
        - Account
      summary: Get invoicing accounts
      description: |
        Gets the list of all the available invoicing accounts that are associated to your Platform account.<br/>

        :::info
        Pay attention to the list, as you will need to specify which invoicing account you want us to use for your project when [creating your project](/project-api/create-project/).
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your invoicing account(s) to be updated and/or modified.
        :::
        <br/>
      operationId: Account_GetInvoicingAccounts
      responses:
        "200":
          description: Available invoicing accounts associated to your Platform account.
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/InvoicingAccount"
              example:
                - id: 1
                  name: "Marketing"
                  currency: "EUR"
                - id: 2
                  name: "IT"
                  currency: "EUR"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /users:
    get:
      tags:
        - Account
      summary: Get users
      description: |
        Gets the list of available users that have been predefined in your Platform account.<br/>
        :::info
        Pay attention to the list, as you will need to specify when [creating your project](/project-api/create-project/) which user from your account must be used.
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your users list to be updated and/or modified.
        :::
        <br/>
      operationId: Account_GetUsers
      responses:
        "200":
          description: Available users assigned to your account
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/User"
              example:
                - id: 1
                  firstName: "Jesús"
                  lastName: "Rivera"
                - id: 2
                  firstName: "Robert"
                  lastName: "Synoradzki"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /project-templates:
    get:
      tags:
        - Account
      summary: Get project templates
      description: |
        Gets the list of all available project templates that have been predefined in your Platform account. <br/>
        > **_Not sure what a template is?_** Check it out in our [glossary](/project-api/support/glossary/).

        :::info
        Pay attention to the list, as you will need to specify which template needs to be applied when [creating your project](/project-api/create-project/).
        :::
        <br/>

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your template to be updated and/or modified.
        :::
        <br/>
      operationId: Account_GetProjectTemplates
      responses:
        "200":
          description: Available project templates in your account
          content:
            application/json:
              schema:
                type: array
                items:
                  $ref: "#/components/schemas/IdAndName"
              example:
                - id: 1
                  name: "Marketing template"
                - id: 2
                  name: "IT template"
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  /project-templates/{id}:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project template
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Account
      summary: Get project template
      description: |
        This operation retrieves the specific details of a selected project template. <br/>
        > **_Not sure what a template is?_** Check it out in our [glossary](/project-api/support/glossary/).

        :::tip Tip
        Contact your assigned LanguageWire Project Manager if you need your template to be updated and/or modified.
        :::
        <br/>
      operationId: Account_GetProjectTemplate
      responses:
        "200":
          description: Project template details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectTemplate"
              example:
                id: 79410
                name: Test project template
                description:
                projectName: Test project template title
                sourceLanguage: "en-GB"
                targetLanguages: []
                translationMemoryId: 163
                translationMemorySetId: null
                TermBaseId: 576
                invoicingAccountId: 33097
                workAreaId: 80
                desiredDeadlineDate:
                desiredDeadlineComment:
                briefingToLanguageWire: ""
                briefingForExperts: briefing
                referenceFiles:
                  - 6342bfe1-a639-466e-a8a5-d335efc27923
        "401":
          $ref: "#/components/responses/Unauthorized"
        "429":
          $ref: "#/components/responses/TooManyRequests"
        "500":
          $ref: "#/components/responses/InternalServerError"
        "504":
          $ref: "#/components/responses/GatewayTimeout"

  # PROJECTS
  /projects:
    post:
      tags:
        - Project
      summary: Create project
      description: |
        This operation creates a [translation project](/project-api/get-started/concepts/#what-is-a-translation-project) in LanguageWire Platform, which is the container for the files (documents) to get translated by our experts.
        :::info Important
        Before creating your project, check the [list of prerequisites](/project-api/get-started/prerequisites/).
        :::
        _____________________
        This is the basic flow you need to follow when creating your project:
          1. Create your translation project with the information needed.<br/>
          2. Add the [files](/project-api/add-source-file/) you want to get translated.<br/>
          3. Start the [project](/project-api/start-project/) so files can be sent to our Platform experts for translation.<br/>
          4. Download the [already translated file](/project-api/download-file/).<br/>

        > **_Curious about the full project creation flow?_** Learn more in our [guides here](/project-api/guides/project-management/).<br/>

        :::tip Tip
        Use **already created templates** to speed the project creation up. <br/>
        - Templates are pre-configured in our Platform by LanguageWire Project Managers based on your needs.
        - Benefit: These help you save time when setting your project up.<br/>

        <a href="https://www.languagewire.com/en/contact" target="_blank"> 📧Contact us</a> for more information.
        :::
        <br/>

      operationId: Project_ProjectCreation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProjectCreation"
        description: The project creation payload
      responses:
        "201":
          description: Project created
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Project"
              example:
                id: 1401031
                title: Example project
                briefing: Some pages selected from our Content Management System
                briefingForExperts: Contents need to be translated carefully
                purchaseOrderNumber: SITECORE-001
                deadline: "2025-12-24T13:26:30Z"
                creationDate: "2025-12-23T09:23:08Z"
                finishedAt: null
                templateId: 188671
                serviceId: null
                translationMemoryId: null
                translationMemorySetId: null
                translationMemorySetVersion: null
                termBaseId: null
                invoicingAccountId: null
                userId: 1120809
                workAreaId: null
                status: "Draft"
                platformLink: https://platform.languagewire.com/ProjectBox/1401031
                referenceFiles: null
                files:
                externalId: "d4385813-e6ca-450c-a50c-56779a9c6057"
                metadata:
                  custom-property-1: "value-1"
                  custom-property-2: "value-2"
        "400":
          $ref: "#/components/responses/BadRequest"

    get:
      parameters:
        - name: status
          in: query
          description: |
            You can use the `status` parameter as a filter to retrieve only those projects that respond to your interest. Available statuses: Draft, Active, Cancelled or Finished\.<br/>
            You can also filter projects by 2 or more status if needed using the ',' as separator. <br/>
            Example: `status=active,draft`<br/>
          required: false
          schema:
            type: string
        - name: title
          in: query
          description: |
            The API will return the projects that contain the title you specify. <br/>
            For instance, if your project title is "My project", you can use `title=my` to retrieve it. <br/>
          required: false
          schema:
            type: string
        - name: externalId
          in: query
          description: |
            Use the externalId parameter to filter the projects the ID on your system. <br/>
            The API will return the projects that matches exactly the ID you specify.
          required: false
          schema:
            type: string
        - name: createdBefore
          in: query
          description: |
            Filter the projects that were created before the date you specify. <br/>
            Example: `createdBefore=2025-02-26T12:45:54` or `createdBefore=2025-02-26`<br/>
          required: false
          schema:
            type: string
        - name: createdAfter
          in: query
          description: |
            Filter the projects that were created after the date you specify. <br/>
            Example: `createdAfter=2025-02-26T12:45:54` or `createdAfter=2025-02-26`<br/>
          required: false
          schema:
            type: string
        - name: fetchMetadata
          in: query
          description: |
            Set this parameter to '1' to retrieve the metadata associated for each project.
          required: false
          schema:
            type: integer
        - name: limit
          in: query
          description: |
            Indicates the amount of projects you want to retrieve per page. Maximum value is 500.
          required: false
          schema:
            type: string
        - name: offset
          in: query
          description: |
            Number of projects to skip before starting to return the projects. Default value is 0.<br/>
            You can use 'limit' and 'offset' together to paginate the results.<br/>
            Example: page 0 could be: `limit=10&offset=0`, and the page 1 could be: `limit=10&offset=10`.
          required: false
          schema:
            type: string
      tags:
        - Project
      summary: Get projects
      description: |
        Gets the list of all projects registered in your Platform account.
        - Use both the `limit` and `offset` values to retrieve the data according to the defined criteria.
        - You can also filter results by certain values for a quicker search.<br/>

        Refer to the [API design section](/project-api/api-design/formats/) for more details about filters and pagination.<br/>
        <br/>
      operationId: Project_GetProjects
      responses:
        "200":
          description: All projects matching criteria
          headers:
            x-next:
              description: A link to the next page of responses
              schema:
                type: string
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ProjectList"
              example:
                projects:
                  - id: 1
                    externalId: "my-system-id-1"
                    title: "Example of a great project"
                    status: "Draft"
                    userId: 1118036
                    deadline: "2025-12-31T12:45:54Z"
                    creationDate: "2025-12-10T12:45:54Z"
                    finishedAt: null
                  - id: 2
                    externalId: "my-system-id-2"
                    title: "Example of great project 2"
                    status: "Cancelled"
                    deadline: "2025-12-21T12:45:54Z"
                    creationDate: "2025-12-11T12:45:54Z"
                    finishedAt: null
                    metadata:
                      custom-property-1: "value-1"
                      custom-property-2: "value-2"
                  - id: 3
                    externalId: "my-system-id-3"
                    title: Example of great project 3
                    status: "Active"
                    creationDate: "2025-12-10T12:45:54Z"
                    deadline: "2025-12-31T12:45:54Z"
                    finishedAt: null
                metadata:
                  previousPage: 0
                  currentPage: 0
                  nextPage: 1
                  itemsPerPage: 10
                  previousPageLink: null
                  nextPageLink: https://api.languagewire.com/project/v1/projects?limit=10&offset=10

  /projects/{id}/do-quote:
    post:
      parameters:
        - name: id
          in: path
          description: ID of the project to get started as a quote
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Start project as a quote
      description: |
        This operation submits your project to LanguageWire Platform for our experts to start the translation process as a quote. <br/>
        :::caution Caution
        Once the project starts you cannot apply any changes using this API. Make sure the project details are correct before starting your project.
        :::
        ------------------------
        **Monitor your project**<br/>
        To follow up how your translation project is progressing, and to track the different status transitions, you can use our polling system. This implies a recurrent GET request to check for data modifications.<br/>
        > **_Curious to know more about the project status?_** Learn more in our [guides here](/project-api/guides/project-management/#project-status).<br/>
        :::tip Tip:
        - For projects that require our experts translation efforts, we recommend you to send a polling request every 1 hour.
        - For Raw MT translations that do not required human intervention, you can do a more frequent poll (every few minutes).
        :::
        <br/>
      operationId: Project_StartQuote
      responses:
        "202":
          description: Project has been sent for translation

  /projects/{id}/do-start:
    post:
      parameters:
        - name: id
          in: path
          description: ID of the project to get started
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Start project
      description: |
        This operation submits your project to LanguageWire Platform for our experts to start the translation process. <br/>
        :::caution Caution
        Once the project starts you cannot apply any changes using this API. Make sure the project details are correct before starting your project.
        :::
        ------------------------
        **Monitor your project**<br/>
        To follow up how your translation project is progressing, and to track the different status transitions, you can use our polling system. This implies a recurrent GET request to check for data modifications.<br/>
        > **_Curious to know more about the project status?_** Learn more in our [guides here](/project-api/guides/project-management/#project-status).<br/>
        :::tip Tip:
        - For projects that require our experts translation efforts, we recommend you to send a polling request every 1 hour.
        - For Raw MT translations that do not required human intervention, you can do a more frequent poll (every few minutes).
        :::
        <br/>
      operationId: Project_StartProject
      responses:
        "202":
          description: Project has been sent for translation

  /projects/{id}:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Get project
      description: This request retrieves specific details for the selected project:Title, External ID, files, deadline, status, target language, etc.
      operationId: Project_GetProject
      responses:
        "200":
          description: Project details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Project"
              example:
                id: 1396416
                title: "This is an example for your project title"
                briefing: "Some pages selected from our Content Management System"
                briefingForExperts: "Content need to be translated carefully"
                purchaseOrderNumber: "Your-invoice-reference-001"
                deadline: "2025-12-24T13:26:30Z"
                creationDate: "2025-12-23T09:23:08Z"
                finishedAt: null
                templateId: 188671
                serviceId: null
                translationMemoryId: null
                translationMemorySetId: null
                translationMemorySetVersion: null
                termBaseId: null
                invoicingAccountId: null
                userId: 1120809
                workAreaId: null
                status: "Active"
                platformLink: https://platform.languagewire.com/ProjectBox/1396416
                referenceFiles:
                  - d4385813-e6ca-450c-a50c-56779a9c6057
                files:
                  - sourceFileId: d4385813-e6ca-450c-a50c-56779a9c6054
                    sourceFileName: "demo.txt"
                    sourceLanguage: "en-GB"
                    translations:
                      - id: 6826676
                        fileId: "a7d6b042-6d38-4fcd-9d17-160bf8e63fc0"
                        targetLanguage: "es-ES"
                        status: "Finished"
                        translationFileName: "demo(spa-ES).txt"
                        translatedFileLink: "https://api.languagewire.com/project/v1/projects/1396416/files/a7d6b042-6d38-4fcd-9d17-160bf8e63fc0"

                      - id: 6826677
                        targetLanguage: de-DE
                        status: "Active"
                externalId: "d4385813-e6ca-450c-a50c-56779a9c6057"

    put:
      parameters:
        - name: id
          in: path
          description: ID of the project to update
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Update project
      description: |
        This operation updates the selected project with the information you provide. <br/>
        :::caution Caution
        You can only update a project if it has not started yet. If a project starts and you need to update it, you should contact your LanguageWire Project Manager.
        :::
      operationId: Project_UpdateProject
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProjectCreation"
            example:
              title: "This is an example for your project title"
              briefing: "Some pages selected from our Content Management System"
              briefingForExperts: "Content need to be translated carefully"
              purchaseOrderNumber: "Your-invoice-reference-001"
              deadline: "2025-12-24T13:26:30Z"
              templateId: 188671
              serviceId: null
              translationMemoryId: null
              translationMemorySetId: null
              translationMemorySetVersion: null
              useTranslationMemory: true
              termBaseId: null
              invoicingAccountId: null
              userId: 1120809
              workAreaId: null
              metadata:
                custom-property-1: "value-1"
                custom-property-2: "value-2"
      responses:
        "204":
          description: Project updated
        "400":
          $ref: "#/components/responses/BadRequest"

    delete:
      parameters:
        - name: id
          in: path
          description: ID of the project to be cancelled
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Cancel project
      description: |
        This operation cancels the selected project. This option is useful for certain cases:
          - When you spot a mistake in the provided data, you need to cancel and create your project again.
          - If you change your mind and you don't want your project to be translated.<br/>

        :::caution Caution
        You can only cancel a project if it has not started yet. If a project starts and you need to cancel it, you should contact your LanguageWire Project Manager.
        :::

      operationId: Project_CancelProject
      responses:
        "204":
          description: Project has been cancelled

  /projects/{id}/metadata:
    put:
      parameters:
        - name: id
          in: path
          description: ID of the project to update the metadata
          required: true
          schema:
            type: integer
            format: int32
      tags:
        - Project
      summary: Update project metadata
      description: |
        This operation updates the metadata to the selected project. <br/>
        You can use this operation to change the metadata even when the project is active.<br/>
        You can also provide an empty object to remove all metadata from the project.
      operationId: Project_UpdateMetadata
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ProjectMetadata"
            example:
              customer-property-1: "value-1"
              customer-property-2: "value-2"
        description: The project metadata key-value information
      responses:
        "204":
          description: Project metadata has been updated

  # PROJECT FILES
  /projects/{id}/files:
    post:
      parameters:
        - name: id
          in: path
          description: ID of the project where the file is going to be added.
          required: true
          schema:
            type: integer
            format: int32
        - name: filename
          in: query
          required: true
          description: |
            You must add a name to your source file together with the file extension. This is a mandatory field.   
            See all [restrictions for names here](/project-api/api-design/formats/).
          schema:
            type: string
        - name: sourceLanguage
          in: query
          description: |
            BCP47 code of the original Language of the file. Example:en-GB (English, United Kingdom). <br/>
            You can find the list of all available languages in our [`/languages` endpoint](/project-api/get-languages).<br/>
            If you are using a project template with a source language already defined, you can skip this parameter.<br/>
            But if you are using a template with source language and you still provide this parameter, the one you provide will override the one in the template.<br/>
          required: false
          schema:
            type: string
        - name: targetLanguages
          in: query
          description: |
            BCP47 codes separated by commas for the languages your file is to be translated. Example:es-ES,it-IT,dk.<br/>
            You can find the list of all available languages in our [`/languages` endpoint](/project-api/get-languages).<br/>
            If you are using a project template with a list of target languages already defined, you can skip this parameter.<br/>
            But if you are using a template with target languages and you still provide this parameter, the list you provide will override the list in the template.<br/>
          required: false
          schema:
            type: string
        - name: callbackUrl
          in: header
          description: |
            An optional URL where you want to receive a notification when the file is translated. <br/>
            The notification will be sent as a POST request with the file details. <br/>
            The URL must be absolute with the HTTPS scheme and must not exceed 256 characters in length.<br/>
            You can find more information in our [webhooks guide](/project-api/guides/webhooks).
          schema:
            type: string
        - name: X-preview
          in: header
          description: |
            An optional URL to a publicly accessible page with the file preview. <br/>
            The preview function shows our experts how the original content (in source language) is integrated in the overall layout, including styles and images.<br/>
            :::caution Caution
            - The page provided must be fully accessible without any authorization.<br/>
            - The URL must be absolute with the HTTP or HTTPS scheme and must not exceed 256 characters in length.<br/>
            :::
          #Caution note Caution
          #It is not allowed to pass a separate external document preview URL along with the embedded one when uploading a Universal Document Format.
          schema:
            type: string
      tags:
        - Files
      summary: Add source file
      description: |
        This operation adds a file with the to-be translated contents, to your translation project.
          - You can only add 1 file per request.
          - However, you can add several target languages to one file if needed.<br/>
          Example:<br/>
                  ```projects/projectid/files?fileName=test.txt&sourceLanguage=en-GB&targetLanguages=it-IT,es-ES```
          - You can also add a callback URL to receive a notification when the file is translated. See more: [Webhooks guide](/project-api/guides/webhooks).<br/>

        :::caution Caution
        - The maximum allowed size is 3Gb per file.<br/>
        - Translation projects can support up to 400 files maximum.<br/>
        - The file name is a mandatory field.<br/>

        See all restrictions, formats and hints in the [File management](/project-api/guides/files-management/) section.<br/>
        :::
        <br/>
      operationId: ProjectFiles_AddFile
      requestBody:
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        "201":
          description: File added to the project
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FileAdded"
              example:
                fileId: d4385813-e6ca-450c-a50c-56779a9c6054
                fileName: your-file-name.txt
                projectId: 3524

  /projects/{id}/files/{fileId}:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project where the file belongs to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the file to be downloaded.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Download file
      description: |
        This operation downloads the translated file (or source file) of a given project.<br/>
        Once your file is translated by our experts you can download it.<br/>
      operationId: ProjectFiles_GetFile
      responses:
        "200":
          description: |
            The file content. <br/>
            The response may vary depending on the file type. <br/>
            So, for example, if you download a .txt file, the response content header will be "plain/text" and 
            the type would be a 'string'.<br/>
            But if you download a .ZIP file, the response content header will be "application/x-zip-compressed" and the 
            type would be 'binary'.
    #          content:
    #          # We don't use this as the open api plugin is rendering it in a way we don't want.
    #          # it adds an "Accept" on the right side with a dropdown with the different options.
    #          # we choose to show the different options in the description instead.
    #          # We leave it here so we can use it if a new version of the plugins renders it in a different way.
    #            plain/text:
    #              schema:
    #                type: string
    #            application/xml:
    #              schema:
    #                type: string
    #            application/json:
    #              schema:
    #                type: string
    #            application/zip:
    #              schema:
    #                type: string
    #                format: binary
    #            application/octet-stream:
    #              schema:
    #                type: string
    #                format: binary

    delete:
      parameters:
        - name: id
          in: path
          description: ID of the project where the file belongs to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the file to be deleted.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Delete file
      description: |
        This operation deletes the selected file.
        This option is useful when the file has been already translated and downloaded, and you want to keep adding new files to your project.
        :::caution Caution
        - If you delete a file, this will be permanently removed from the project and you won't be able to recover it.
        - You can only delete your files while creating your project (i.e. Draft status) but never when the project has started.
        :::
        <br/>
      operationId: ProjectFiles_DeleteFile
      responses:
        "204":
          description: File permanently deleted from the project

  /projects/{id}/files/{fileId}/metadata:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project where the file was added to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the file to get the metadata from.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Get file metadata
      description: It returns all user-defined metadata or details for the specific file.
      operationId: ProjectFiles_GetFileMetadata
      responses:
        "200":
          description: The file details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FileMetadata"
              example:
                fileId: d4385813-e6ca-450c-a50c-56779a9c6054
                fileName: Some-test-file.txt
                contentType: text
                fileSize: 325
                projectId: 3524
                uploadDate: "2025-08-18T08:54:25Z"
                lastAccessed: "2025-08-18T08:54:25Z"

  #REFERENCE-FILES
  /projects/{id}/reference-files:
    post:
      parameters:
        - name: id
          in: path
          description: ID of the project to which the reference file will be added.
          required: true
          schema:
            type: integer
            format: int32
        - name: filename
          in: query
          required: true
          description: |
            You must add a name to your reference file together with the file extension. This is a mandatory field. 
              - The reference file name can only contain characters from <a href="https://en.wikipedia.org/wiki/ISO/IEC_8859-1" target="_blank">ISO/IEC 8859-1</a> standard.<br/>
              - The name must not exceed 100 characters in length.<br/> 

            See the full list of recommendations and restrictions in the [formats and standards guide](/project-api/api-design/formats/).<br/>

            :::tip Tip
            If you want your reference file to be the default preview option for our experts, so they can visualise it while translating your file: 
            Use the same name for both, your reference file and the file to be translated. Both names should match.
            :::

          schema:
            type: string
      tags:
        - Files
      summary: Add reference file
      description: |
        You can optionally include a reference file to your project by means of this operation. The reference file provides context to our experts, helping them on the translation process.<br/>
        Some examples of reference files are: HTML for websites, but also images, PDFs, or any other material.<br/>
        :::info Info
        * In case of a HTML, you should include the .ZIP container with all the assets: images, style CSS, etc.<br/>
        * See all reference files restrictions and hints in the [Files management guide](/project-api/guides/files-management/).
        :::

        <br/>
      operationId: ProjectFiles_AddReferenceFile
      requestBody:
        content:
          application/octet-stream:
            schema:
              type: string
              format: binary
      responses:
        "201":
          description: Reference file added to the project

  /projects/{id}/reference-files/{fileId}:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project where the reference file has been added to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the reference file to be downloaded.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Download reference file
      description: |
        This operation downloads a reference file of a given project.

      operationId: ProjectFiles_GetReferenceFile
      responses:
        "200":
          description: |
            The file content. <br/>
            The response may vary depending on the file type. <br/>
            So, for example, if you download a .txt file, the response content header will be "plain/text" and 
            the type would be a 'string'.<br/>
            But if you download a .ZIP file, the response content header will be "application/x-zip-compressed" and the 
            type would be 'binary'.
    #          content:
    #          # We don't use this as the open api plugin is rendering it in a way we don't want.
    #          # it adds an "Accept" on the right side with a dropdown with the different options.
    #          # we choose to show the different options in the description instead.
    #          # We leave it here so we can use it if a new version of the plugins renders it in a different way.
    #            plain/text:
    #              schema:
    #                type: string
    #            application/xml:
    #              schema:
    #                type: string
    #            application/json:
    #              schema:
    #                type: string
    #            application/zip:
    #              schema:
    #                type: string
    #                format: binary
    #            application/octet-stream:
    #              schema:
    #                type: string
    #                format: binary

    delete:
      parameters:
        - name: id
          in: path
          description: ID of the project where the reference file has been added to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the reference file to be deleted.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Delete reference file
      description: |
        This operation deletes the selected reference file.
        :::caution Caution
        - If you delete a reference file, this will be permanently removed from the project and you won't be able to recover it.
        - You can only delete your reference files while creating your project (i.e. Draft status) but never when the project has started.
        :::
        <br/>
      operationId: ProjectFiles_DeleteReferenceFile
      responses:
        "204":
          description: Reference file deleted from the project

  /projects/{id}/reference-files/{fileId}/metadata:
    get:
      parameters:
        - name: id
          in: path
          description: ID of the project where the reference file has been added to.
          required: true
          schema:
            type: integer
            format: int32
        - name: fileId
          in: path
          description: ID of the reference file to get the metadata from.
          required: true
          schema:
            type: string
      tags:
        - Files
      summary: Get reference file metadata
      description: It returns all user-defined metadata or details for the specific reference file.
      operationId: ProjectFiles_GetReferenceFileMetadata
      responses:
        "200":
          description: The reference file details
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/FileMetadata"
              example:
                fileId: 77aeeea0-66dc-4925-a0e2-e5cd537dbca0
                fileName: test-reference-file.txt
                contentType: text
                fileSize: 325
                projectId: 3524
                uploadDate: "2025-01-27T08:54:25Z"
                lastAccessed: "2025-01-27T08:54:25Z"

components:
  responses:
    BadRequest:
      description: Bad request
      content:
        application/json:
          schema:
            type: array
            items:
              $ref: "#/components/schemas/Error"
          example:
            - code: V001
              message: 001 - Title request
              hints: Add a title to your project that can be easily recognized. It should have between 5 and 350 characters.
            - code: V002
              message: 002 - Deadline
              hints: Deadline must follow the <a href="https://en.wikipedia.org/wiki/ISO_8601" target="_blank">ISO 8601</a> format as Coordinated Universal Time (UTC) with a zero offset:YYYY-MM-DDTHH:MM:SSZ.

    Unauthorized:
      description: Unauthorized
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: 401
            message: Your access key was rejected by LanguageWire Platform.
            hints: Generate new access keys from the [Dashboard](/dashboard/) or contact one of our Project Managers to reset your Platform credentials.
    TooManyRequests:
      description: Too many requests
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: 429
            message: You have sent too many requests in a very short period of time.
            hints: We know you are eager to get your API responses, but we are not that fast! Please wait until the next rate limit window is reset. Check the [Rate limits](/project-api/guides/rate-limits/) section for more details.
    InternalServerError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: 500
            message: 😧 Oops, this is unexpected... Sorry, it seems there is a temporary error in our server. We are investigating and working to fix it as soon as possible.
            hints: |
              In the meantime, here is what you can do:
              - 🔄 Refresh and try again (well, sometimes work!).
              - ☕ Have a coffee (or beer) and try again in 30 minutes.
              - ☎️ If the error persists, <a href="https://www.languagewire.com/en/contact" target="_blank">contact us</a>.
    GatewayTimeout:
      description: Gateway timeout
      content:
        application/json:
          schema:
            $ref: "#/components/schemas/Error"
          example:
            code: 504
            message: Unfortunately we could not complete your request as this operation is taking too long. We are investigating and working to fix it as soon as possible.
            hints: |
              In the meantime, here is what you can do:
              - 🔄 Refresh and try again (well, sometimes work!).
              - ☕ Have a coffee (or beer) and try again in 30 minutes.
              - ☎️ If the error persists, <a href="https://www.languagewire.com/en/contact" target="_blank">contact us</a>.

  schemas:
    Version:
      type: object
      properties:
        version:
          type: string
        branchName:
          type: string
          description: This is only used in lower environments (e.g. staging). It should be `null` in production.

    IdAndName:
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string

    Language:
      type: object
      properties:
        languageCode:
          type: string
          description: The language code follows the <a href="https://en.wikipedia.org/wiki/IETF_language_tag" target="_blank"> BCP 47</a> format. <br/>For example, the tag `/en` stands for English and `/es-419` for Latin American Spanish.
        languageName:
          type: string
          description: Together with the code, the language is always identified by its name in English.

    LanguagePair:
      type: object
      properties:
        sourceLanguageCode:
          type: string
          description: The source language code follows the standard <a href="https://en.wikipedia.org/wiki/IETF_language_tag" target="_blank"> BCP 47</a> format. <br/>For example, the tag `/en` stands for English and `/es-419` for Latin American Spanish.
        targetLanguageCode:
          type: string
          description: The target language code follows the standard <a href="https://en.wikipedia.org/wiki/IETF_language_tag" target="_blank"> BCP 47</a> format. <br/>For example, the tag `/en` stands for English and `/es-419` for Latin American Spanish.

    InvoicingAccount:
      type: object
      properties:
        id:
          format: int32
          type: integer
        name:
          type: string
        currency:
          type: string

    User:
      type: object
      properties:
        id:
          format: int32
          type: integer
        firstName:
          type: string
        lastName:
          type: string

    TranslationMemorySet:
      type: object
      properties:
        id:
          format: int32
          type: integer
          description: "Unique identifier for the Translation Memory Set."
        version:
          type: integer
          description: "Version number of the Translation Memory Set."
        name:
          type: string
          description: "Name of the Translation Memory Set."
        description:
          type: string
          description: "Description providing details about the Translation Memory Set."
        status:
          type: string
          description: "Current status of the Translation Memory Set. Possible values: Active or Inactive."
        deleted:
          type: boolean
          description: "Indicates if the Translation Memory Set has been deleted."
        createdOn:
          type: string
          format: date-time
          description: "Timestamp of when the Translation Memory Set was created."
          example: "2025-09-10T12:44:26Z"
        translationMemoryFamilies:
          type: array
          items:
            type: object
            properties:
              familyId:
                type: integer
                description: "Unique identifier for the translation memory."
                example: 94420
              priority:
                type: integer
                description: "Priority number (lower is more important) of the translation memory family within the cascade."
              penalty:
                type: integer
                description: "Penalty that applies to the results obtain for this translation memory family within the cascade."
                example: 0
              read:
                type: boolean
                description: "Value indicating whether units can be read from this translation memory family."
              write:
                type: boolean
                description: "Value indicating whether units can be written from this translation memory family."
              concordance:
                type: boolean
                description: "Value indicating whether units can be use for concordance search from this translation memory family."

    ProjectTemplate:
      type: object
      properties:
        id:
          type: integer
        name:
          type: string
        description:
          type: string
        projectName:
          type: string
        sourceLanguage:
          type: string
        targetLanguages:
          type: array
          items:
            type: string
        translationMemoryId:
          type: integer
        translationMemorySetId:
          type: integer
        termBaseId:
          type: integer
        invoicingAccountId:
          type: integer
        workAreaId:
          type: integer
        desiredDeadlineDate:
          type: string
        desiredDeadlineComment:
          type: string
        briefingToLanguageWire:
          type: string
        briefingForExperts:
          type: string
        referenceFiles:
          type: array
          items:
            type: string

    ProjectCreation:
      type: object
      properties:
        title:
          type: string
          description: |
            Add a title to your project that can be easily recognized.<br/>
              - You are allowed to use a maximum of 500 characters for your title.<br/>
              - When using a project template, the title from the template will be used unless you provide a new one. In that case, the provided one will overwrite the template title.
        briefing:
          type: string
          description: Summarise what is your project about (in general terms). <br/>Example:*This is a project to get a medical article translated from German into French*.
        briefingForExperts:
          type: string
          description: Add any information that helps our experts to accurately translate your content.<br/> Example:*This is a medical article, please keep in mind that some treatment names should not be translated as they are referred by generic brand names*.
        purchaseOrderNumber:
          type: string
        deadline:
          format: date-time
          type: string
          description: Set the date when this project should be finished. <br/>
            - If the selected deadline is too tight, we will contact you before starting the project.<br/>
            - If not specified, or if set to null, LanguageWire will assign a deadline.<br/>
            💡 Tip:Use the [ISO 8601](/project-api/api-design/formats/#timestamps) format as Coordinated Universal Time (UTC) for the dates.
        templateId:
          format: int32
          type: integer
          description: |
            ⚠️ If you are using a template you don't need to specify the following fields: `title`, `serviceId`, `translationMemoryId`, `translationMemorySetId`, `termBaseId`, `invoicingAccountId`, or `workareaId`
            - You can remove the values or set them to `null`.<br/>
            - Any value added to those fields will be used instead of the value set in the project template except the `serviceId` which cannot be overridden.
        serviceId:
          format: int32
          type: integer
          description:
            This is the ID of the service you need for your translation project. Example:Localisation, SEO, translation and validation,etc.<br/>
            Refer to the [`GET /services`](/project-api/get-services/) call for more information.
        translationMemoryId:
          format: int32
          type: integer
          description:
            This is the ID of the translation memory you need for your translation project.<br/>
            Refer to the [`GET /translation-memories`](/project-api/get-translation-memories/) call for more information.
        translationMemorySetId:
          format: int32
          type: integer
          description:
            This is the ID of the translation memory set you need for your translation project.<br/>
            TM sets always have preference over single TMs.<br/>
            Refer to the [`GET /translation-memory-sets`](/project-api/get-translation-memory-sets/) call for more information.
        useTranslationMemory:
          type: boolean
          default: true
          description: >
            Indicates if a translation memory must be used or not for your project.<br/>
            If set to `true` and no translation memory ID is explicitly provided or configured in a provided project template, the platform will attempt to use the primary translation memory set at the company level.<br/>
            If set to `false`, the project will not use a TM regardless of what is specified using the `translationMemoryID` setting, the translation memory configured in the project templated used or the company's primary translation memory.
        termBaseId:
          format: int32
          type: integer
          description:
            This is the ID of the term base you need for your translation project.<br/>
            Refer to the [`GET /term-bases`](/project-api/get-term-bases/) call for more information.
        invoicingAccountId:
          format: int32
          type: integer
          description:
            This is the ID of the LanguageWire Platform  account you want us to use for this project invoice. <br/>
            ⚠️ Make sure you use an invoicing account ID that is up to date, otherwise the project might be cancelled.<br/>
            Refer to the [`GET /invoicing-accounts`](/project-api/get-invoicing-accounts/) call for more information.
        userId:
          format: int32
          type: integer
          description:
            This is the ID of the user you need for your translation project.<br/>
            Refer to the [`GET /users`](/project-api/get-users/) call for more information.
        workAreaId:
          format: int32
          type: integer
          description:
            This is the ID of the specialization field that describes your translation project. Example:Science - Genetics.<br/>
            💡 Tip:Specify this field, according to the nature of the to-be-translated contents, so we ensure our experts in the matter work on them.
            Refer to the [`GET /workareas`](/project-api/get-workareas/) call for more information.
        externalId:
          type: string
          description: This is the identifier you choose for your project.<br/>
            💡 Tip:Choose an identifier that matches your system records, this way you will be able to track it easily. We recommend to use a [universally unique identifier (UUIDv4 or GUID)](https://en.wikipedia.org/wiki/Universally_unique_identifier).
            <br/>
        metadata:
          type: object
          description: Metadata to add to the project.
          $ref: "#/components/schemas/ProjectMetadata"

    ProjectItem:
      type: object
      properties:
        id:
          type: integer
        externalId:
          type: string
        title:
          type: string
        userId:
          type: integer
        companyId:
          type: integer
        status:
          type: string
        creationDate:
          format: date-time
          type: string
          description: It takes the date when the project was created.
        deadline:
          format: date-time
          type: string
        finishedAt:
          format: date-time
          type: string
          description: This is the date when the project status transitions from "active" to "finished".
        metadata:
          type: object
          description: This is the metadata that has been added to the project.
          $ref: "#/components/schemas/ProjectMetadata"

    Project:
      type: object
      properties:
        id:
          type: integer
        externalId:
          type: string
        title:
          type: string
        briefing:
          type: string
        briefingForExperts:
          type: string
        purchaseOrderNumber:
          type: string
        deadline:
          format: date-time
          type: string
        creationDate:
          format: date-time
          type: string
        finishedAt:
          format: date-time
          type: string
        templateId:
          type: integer
        serviceId:
          type: integer
        translationMemoryId:
          type: integer
        translationMemorySetId:
          type: integer
        translationMemorySetVersion:
          type: integer
        useTranslationMemory:
          type: boolean
        termBaseId:
          type: integer
        invoicingAccountId:
          type: integer
        userId:
          type: integer
        workAreaId:
          type: integer
        status:
          type: string
        platformLink:
          type: string
        referenceFiles:
          type: array
          items:
            type: string
        files:
          type: array
          items:
            $ref: "#/components/schemas/FileTranslations"
        metadata:
          type: object
          description: This is the metadata that has been added to the project.
          $ref: "#/components/schemas/ProjectMetadata"

    ProjectMetadata:
      type: object
      description: This is the metadata that has been added to the project.
      additionalProperties:
        type: string

    ProjectList:
      type: object
      properties:
        projects:
          type: array
          items:
            $ref: "#/components/schemas/ProjectItem"
        metadata:
          type: object
          description: This is the metadata about the pagination.
          $ref: "#/components/schemas/ProjectListMetadata"

    ProjectListMetadata:
      type: object
      properties:
        previousPage:
          type: integer
        currentPage:
          type: integer
        nextPage:
          type: integer
        itemsPerPage:
          type: integer
        previousPageLink:
          type: string
        nextPageLink:
          type: string

    FileTranslations:
      type: object
      properties:
        sourceFileId:
          type: string
        sourceFileName:
          type: string
        sourceLanguage:
          type: string
        translations:
          type: array
          items:
            $ref: "#/components/schemas/Translation"

    Translation:
      type: object
      properties:
        id:
          type: integer
        fileId:
          type: string
        targetLanguage:
          type: string
        status:
          type: string
        translationFileName:
          type: string
        translationFileLink:
          type: string

    FileAdded:
      type: object
      properties:
        fileId:
          type: string
        fileName:
          type: string
        projectId:
          type: integer

    FileMetadata:
      type: object
      properties:
        fileId:
          type: string
        fileName:
          type: string
        contentType:
          type: string
        fileSize:
          type: integer
        projectId:
          type: integer
        uploadDate:
          format: date-time
          type: string
        lastAccessDate:
          format: date-time
          type: string

    Error:
      type: object
      required:
        - code
        - message
        - hints
      properties:
        code:
          type: string
        message:
          type: string
        hints:
          type: string

  securitySchemes:
    # BasicAuth:
    #   type: http
    #   scheme: basic
    lw_auth:
      description: |
        Get access to data while protecting your account credentials.
        OAuth2 is also a safer and more secure way to give you access.
      type: http
      scheme: bearer
      bearerFormat: JWT
    api_key:
      description: >
        For this example, you can use the api key `special-key` to test the
        authorization filters.
      type: apiKey
      name: CompanyId
      in: header

security:
  - lw_auth: []
