> ## 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

> Uploads one or more bilingual files for a job and returns the updated job parts together with their project. 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.



## OpenAPI

````yaml /openapi/phrase-tms-v2.json post /api2/v2/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: '2'
  title: Phrase TMS API
servers:
  - url: https://cloud.memsource.com/web
security:
  - ApiToken: []
  - OAuth2: []
tags:
  - name: Analysis
  - name: Bilingual File
  - name: Connector
  - name: Conversations
  - name: Job
  - name: Net Rate Scheme
  - name: Project
  - name: Project Template
  - name: Provider
  - name: Quality Assurance
  - name: Quote
  - name: Reference File
  - name: Term Base
  - name: Translation
  - name: Translation Memory
  - name: User
  - name: Webhook
  - name: Workflow changes
paths:
  /api2/v2/bilingualFiles:
    post:
      tags:
        - Bilingual File
      summary: Upload bilingual file
      description: >-
        Uploads one or more bilingual files for a job and returns the updated
        job parts together with their project. 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.
      operationId: uploadBilingualFileV2
      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
      requestBody:
        content:
          multipart/form-data:
            schema:
              $ref: >-
                #/components/schemas/BilingualFileApi2ResourceUploadBilingualFileRequestDtoV2
        description: Multipart request with files
        required: true
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/Job_parts_affected_by_the_operation_together_with_their_project
        '400':
          description: Bad Request
        '401':
          description: Not authorized
        '403':
          description: Forbidden
        '404':
          description: Resource 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'
    Job_parts_affected_by_the_operation_together_with_their_project:
      type: object
      properties:
        jobs:
          type: array
          description: Job parts affected by the operation
          items:
            $ref: >-
              #/components/schemas/A_reference_to_a_job_part_workflow-step_instance_of_a_job_
        project:
          $ref: '#/components/schemas/A_reference_to_a_project'
    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
        size:
          type: integer
          format: int64
    A_reference_to_a_job_part_workflow-step_instance_of_a_job_:
      type: object
      properties:
        continuous:
          type: boolean
          description: >-
            When true, this is a continuous job that automatically imports
            updated source files
        dateCreated:
          type: string
          format: date-time
          description: Date and time the job part was created
        dateDue:
          type: string
          format: date-time
          description: Due date of the job part; null if not set
        filename:
          type: string
          description: Original filename of the job
        imported:
          type: boolean
          description: >-
            When true, the file has been fully imported and is ready for
            translation
        jobAssignedEmailTemplate:
          $ref: '#/components/schemas/ObjectReference'
        notificationIntervalInMinutes:
          type: integer
          format: int32
          description: Minimum interval in minutes between assignment notification emails
        providers:
          type: array
          description: Providers assigned to this job part; empty for non-linguist callers
          items:
            $ref: '#/components/schemas/ProviderReferenceV1'
        sourceFileUid:
          type: string
          description: UID of the source file; null if unavailable
        status:
          type: string
          description: Current status of the job part
          enum:
            - NEW
            - ACCEPTED
            - DECLINED
            - REJECTED
            - DELIVERED
            - EMAILED
            - COMPLETED
            - CANCELLED
        targetLang:
          type: string
          description: Target language code
        uid:
          type: string
          description: Unique identifier used in API paths
        updateSourceDate:
          type: string
          format: date-time
          description: >-
            Date and time the source file was last updated; null if never
            updated
        workflowLevel:
          type: integer
          format: int32
          description: Position of the workflow step (1-based)
        workflowStep:
          $ref: '#/components/schemas/WorkflowStepReferenceV1'
    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
    InputStream:
      type: object
    ObjectReference:
      type: object
    ProviderReferenceV1:
      type: object
      required:
        - type
      discriminator:
        propertyName: type
      properties:
        id:
          type: string
        type:
          type: string
        uid:
          type: string
          description: UID of the provider
          readOnly: true
    WorkflowStepReferenceV1:
      type: object
      properties:
        id:
          type: string
        lqaEnabled:
          type: boolean
        name:
          type: string
        order:
          type: integer
          format: int32
        uid:
          type: string
  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: {}

````