---
title: "File translations"
method: POST
path: "/v1/fileTranslations"
tags: ["File translations"]
---

# File translations

`POST /v1/fileTranslations`

Creates a new file translations request based on multipart/form-data. The translation state can be fetched 
utilizing a returned UID in the response and a [Metadata](/en/api/language-ai/file-translations/file-processing-metadata) endpoint. It is also 
possible to download the translated file using the [Get file](/en/api/language-ai/file-translations/action-result) endpoint once the 
translation is complete (`action.status == OK`).

## Response `200`

Response with UID of the file translations request.

- FileTranslationsResponseV1
  - `uid` string, required — UID of the operation. UID can be used to query the result.
  - `actions` ActionV1[], required
    - `actionType` 'CONVERTER_IMPORT' | 'FILE_IMPORT' | 'MT_GENERIC_PRETRANSLATE' | 'QUALITY_ESTIMATION', required
    - `results` ActionResultV1[], required
      - `id` string, required
      - `sourceLang` string, required
      - `targetLang` string, required
      - `status` 'ERROR' | 'OK' | 'RUNNING', required
  - `metadata` FileTranslationsMetadataV1, required
    - `sourceLang` LanguageV1, required
      - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
    - `targetLangs` LanguageV1[], required
      - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
    - `actionTypes` ActionTypeEnumV1[], required
    - `callbackUrl` string, uri — URI in [RFC 2396](https://datatracker.ietf.org/doc/html/rfc2396) format.
    - `mtSettings` MtSettingsV1
      - `usePhraseMTSettings` boolean — Use Language AI to apply Machine Translation
      - `profile` TranslationProfileRequestV1
        - `uid` string, required — UID for the translation profile
    - `transMemoriesConfig` TranslationMemoriesConfigV1[]
      - `targetLang` LanguageV1
        - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
      - `transMemories` TranslationMemoryRequestV1[]
        - `transMemory` object
          - `uid` string — Unique identifier of the translation memory
        - `tmSourceLocale` LanguageV1
          - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.
        - `tmTargetLocale` LanguageV1
          - `code` string, required — Language code, using a two-letter language code from ISO 639-1, e.g., `cs`. Optionally, a region subtag based on a two-letter country code from ISO 3166-1 alpha-2, e.g., `cs_cz`, or a three-digit code from UN M.49, e.g., `es_419`, separated by an underscore. Both the two-letter language code and the two-letter country code need to be lower case. Note that the Phrase Language AI setup dictates whether the region subtag is optional or not. If the only models deployed to a profile explicitly specify or are customized with a target locale, then a region subtag is mandatory.

## Other responses

- `400` — Bad request
- `401` — Not authorized
- `403` — Forbidden
- `404` — Resource not found
- `405` — Method not allowed
- `408` — Timeout
- `410` — Gone
- `415` — Unsupported media type
- `429` — Too many requests
- `500` — Internal server error
- `501` — Not implemented

---

[API](https://skmtc.net/phrase/apis/control-hub-service.md) · [All operations](https://skmtc.net/phrase/apis/control-hub-service/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/phrase/control-hub-service/revisions/98ecac7ba2bf/schema)
