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

# Upload bilingual file (async)

> Asynchronously uploads one or more bilingual files for a job. Send the files as a multipart/form-data request using the `file` form field. ZIP archives are automatically expanded into the bilingual files they contain. A maximum of 50 files may be uploaded in a single request. The `saveToTransMemory` parameter controls whether confirmed segments are saved to the translation memory, and `setCompleted` marks the affected job parts as completed after the upload. Requires EDIT and EDIT_SEGMENT rights on the job. The files are validated and accepted immediately and the processing continues in the background; the call returns `202 Accepted` with an asynchronous request, which is a parent request with one child request for each uploaded file. Poll [Get asynchronous request](../async-request/get-asynchronous-request) until the `asyncResponse` of the parent request is set; a child request with an error in its `asyncResponse` means that the particular file was not uploaded. The files are processed sequentially and independently, so a failure of one file does not roll back the files that were already uploaded. If any file fails, the parent request finishes with an error in its `asyncResponse` and the per-file results are available on the child requests. Optionally, `callbackUrl` can be used to receive a notification once the parent request has finished successfully; no callback is sent when any file failed. See the [MXLIFF guide](https://developers.phrase.com/en/guides/mxliff/overview) for the bilingual file format reference.



## OpenAPI

````yaml /openapi/phrase-tms-v3.json post /api2/v3/bilingualFiles
openapi: 3.0.0
info:
  description: |-
    Welcome to Phrase's TMS API documentation. 

     Please visit our [help center](https://support.phrase.com/hc/en-us/sections/5709662083612) for more information about the APIs. 

     If you have any questions, please contact [Support](https://support.phrase.com/hc/requests/new). 

     Please, include the `User-Agent` header with the name of your application or project. It might be a good idea to include some sort of contact information as well, so that we can get in touch if necessary. Examples of excellent `User-Agent` headers:
     > User-Agent: Example mobile app (example@phrase.com) <br/> User-Agent: ACME Inc Java 1.8 Client (http://acmeinc.com/contact)
  version: '3'
  title: Phrase TMS API
servers:
  - url: https://cloud.memsource.com/web
security:
  - ApiToken: []
  - OAuth2: []
tags:
  - name: Analysis
  - name: Authentication
  - name: Automations
  - name: Bilingual File
  - name: Connector
  - name: Conversations
  - name: Job
  - name: Project
  - name: Project Template
  - name: Quality Assurance
  - name: Translation
  - name: Translation Memory
  - name: User
paths:
  /api2/v3/bilingualFiles:
    post:
      tags:
        - Bilingual File
      summary: Upload bilingual file (async)
      description: >-
        Asynchronously uploads one or more bilingual files for a job. Send the
        files as a multipart/form-data request using the `file` form field. ZIP
        archives are automatically expanded into the bilingual files they
        contain. A maximum of 50 files may be uploaded in a single request. The
        `saveToTransMemory` parameter controls whether confirmed segments are
        saved to the translation memory, and `setCompleted` marks the affected
        job parts as completed after the upload. Requires EDIT and EDIT_SEGMENT
        rights on the job. The files are validated and accepted immediately and
        the processing continues in the background; the call returns `202
        Accepted` with an asynchronous request, which is a parent request with
        one child request for each uploaded file. Poll [Get asynchronous
        request](../async-request/get-asynchronous-request) until the
        `asyncResponse` of the parent request is set; a child request with an
        error in its `asyncResponse` means that the particular file was not
        uploaded. The files are processed sequentially and independently, so a
        failure of one file does not roll back the files that were already
        uploaded. If any file fails, the parent request finishes with an error
        in its `asyncResponse` and the per-file results are available on the
        child requests. Optionally, `callbackUrl` can be used to receive a
        notification once the parent request has finished successfully; no
        callback is sent when any file failed. See the [MXLIFF
        guide](https://developers.phrase.com/en/guides/mxliff/overview) for the
        bilingual file format reference.
      operationId: uploadBilingualFileV3
      parameters:
        - name: saveToTransMemory
          in: query
          description: >-
            Controls whether confirmed segments are saved to the translation
            memory
          required: false
          schema:
            type: string
            enum:
              - All
              - Confirmed
              - None
            default: Confirmed
        - name: setCompleted
          in: query
          description: >-
            When true, marks the affected job parts as completed after the
            upload
          required: false
          schema:
            type: boolean
            default: false
        - name: callbackUrl
          in: query
          description: URL called once the asynchronous request has finished
          required: false
          schema:
            type: string
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/BilingualFileApi2ResourceUploadBilingualFileRequestDtoV2
        description: Multipart request with files
        required: true
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AsyncRequestWrapperV2DtoV2'
        '400':
          description: Bad Request
        '401':
          description: Not authorized
        '403':
          description: Forbidden
        '404':
          description: Not Found
        '405':
          description: Method not allowed
        '408':
          description: Timeout
        '410':
          description: Gone
        '415':
          description: Unsupported media type
        '429':
          description: Too many requests
        '500':
          description: Internal server error
        '501':
          description: Not implemented
components:
  schemas:
    BilingualFileApi2ResourceUploadBilingualFileRequestDtoV2:
      type: object
      required:
        - file
      properties:
        file:
          $ref: '#/components/schemas/MultipartFile'
    AsyncRequestWrapperV2DtoV2:
      type: object
      properties:
        asyncRequest:
          $ref: '#/components/schemas/AsyncRequestV2DtoV2'
        reference:
          $ref: '#/components/schemas/AsyncRequestReferenceDtoV2'
    MultipartFile:
      type: object
      properties:
        bytes:
          type: array
          items:
            type: string
            format: byte
        contentType:
          type: string
        empty:
          type: boolean
        inputStream:
          $ref: '#/components/schemas/InputStream'
        name:
          type: string
        originalFilename:
          type: string
        resource:
          $ref: '#/components/schemas/Resource'
        size:
          type: integer
          format: int64
    AsyncRequestV2DtoV2:
      type: object
      properties:
        action:
          type: string
          enum:
            - PRE_ANALYSE
            - POST_ANALYSE
            - CONTINUOUS_PRE_ANALYSE
            - CONTINUOUS_POST_ANALYSE
            - COMPARE_ANALYSE
            - PARENT_ANALYSE
            - PRE_TRANSLATE
            - ASYNC_TRANSLATE
            - IMPORT_JOB
            - IMPORT_FILE
            - IMPORT_DOCX
            - IMPORT_MXLF
            - IMPORT_XLF
            - ALIGN
            - EXPORT_TMX_BY_QUERY
            - EXPORT_TMX
            - IMPORT_TMX
            - IMPORT_MXLF_INTO_TM
            - STORE_BILINGUAL_FILE_TO_TM
            - IMPORT_TBX
            - IMPORT_TBX_TB3
            - INSERT_INTO_TM
            - DELETE_TM
            - CLEAR_TM
            - QA
            - QA_V3
            - UPDATE_CONTINUOUS_JOB
            - UPDATE_SOURCE
            - UPDATE_TARGET
            - EXTRACT_CLEANED_TMS
            - GLOSSARY_PUT
            - GLOSSARY_DELETE
            - ASYNC_TRANSLATE_VERIFY
            - CREATE_PROJECT
            - UPLOAD_BILINGUAL_FILES
            - EXPORT_COMPLETE_FILE
            - IMPORT_ANNOTATIONS
            - FILE_FLOW_CONVERTER_IMPORT
            - FILE_FLOW_MT_PRETRANSLATE
            - FILE_FLOW_QUALITY_ESTIMATION
            - AUTO_LQA
            - ADOPT_SEGMENT_DATA
            - ADOPT_SEGMENT_SET_DATA
            - QP_EVALUATION
            - QP_EVALUATION_V2
            - QUALITY_EVALUATION
            - AUTO_ADAPT
            - MT_OPTIMIZE
        asyncResponse:
          $ref: '#/components/schemas/AsyncResponseV2DtoV2'
        createdBy:
          $ref: '#/components/schemas/UserReferenceV1'
        dateCreated:
          type: string
          format: date-time
        id:
          type: string
        parent:
          $ref: '#/components/schemas/AsyncRequestV2DtoV2'
        project:
          $ref: '#/components/schemas/A_reference_to_a_project'
    AsyncRequestReferenceDtoV2:
      type: object
      properties:
        type:
          type: string
          description: Type of the object
          enum:
            - JOB
        uid:
          type: string
          description: UID of the object
      description: Reference object that is being processed by async request
    InputStream:
      type: object
    Resource:
      type: object
      properties:
        description:
          type: string
        file:
          type: string
          format: binary
        filename:
          type: string
        inputStream:
          $ref: '#/components/schemas/InputStream'
        open:
          type: boolean
        readable:
          type: boolean
        uri:
          type: string
          format: uri
        url:
          type: string
          format: url
    AsyncResponseV2DtoV2:
      type: object
      properties:
        dateCreated:
          type: string
          format: date-time
        errorCode:
          type: string
        errorDesc:
          type: string
        errorDetails:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDtoV2'
        warnings:
          type: array
          items:
            $ref: '#/components/schemas/ErrorDetailDtoV2'
    UserReferenceV1:
      type: object
      properties:
        email:
          type: string
          description: Email address of the user
        firstName:
          type: string
          description: First name of the user
        id:
          type: string
          description: Unique numeric identifier of the user
        lastName:
          type: string
          description: Last name of the user
        role:
          type: string
          description: Role of the user in the organization
          enum:
            - SYS_ADMIN
            - SYS_ADMIN_READ
            - ADMIN
            - PROJECT_MANAGER
            - LINGUIST
            - GUEST
            - SUBMITTER
            - PORTAL_MEMBER
            - BOT
        uid:
          type: string
          description: Unique string identifier of the user
        userName:
          type: string
          description: Username of the user
    A_reference_to_a_project:
      type: object
      properties:
        name:
          type: string
          description: Name of the project
        uid:
          type: string
          description: Unique identifier used in API paths
    ErrorDetailDtoV2:
      type: object
      properties:
        args:
          type: object
          description: Related arguments, e.g. number => "hello world"
          additionalProperties:
            type: object
        code:
          type: string
          description: Code, e.g. NOT_FOUND.
        message:
          type: string
          description: Optional human-readable message.
  securitySchemes:
    ApiToken:
      description: >-
        Get a token from `auth/login` [endpoint](#operation/login) and then pass
        it in the `Authorization` HTTP header in every subsequent API call. For
        more information visit our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#token-0-0).
      type: apiKey
      name: Authorization
      in: header
    OAuth2:
      description: >-
        A standard OAuth 2.0 authorization code flow. For more information visit
        our [help
        center](https://support.phrase.com/hc/en-us/articles/5709662181404-API-Authentication-TMS-#oauth-2-0-0-1).
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://cloud.memsource.com/web/oauth/authorize
          tokenUrl: https://cloud.memsource.com/web/oauth/token
          scopes: {}

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.