Skip to main content

Add source file

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.
    Example:
    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.
Caution
  • The maximum allowed size is 3Gb per file.
  • Translation projects can support up to 400 files maximum.
  • The file name is a mandatory field.

See all restrictions, formats and hints in the File management section.


Path Parameters
id int32 REQUIRED

ID of the project where the file is going to be added.

Query Parameters
filename string REQUIRED

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.

sourceLanguage string

BCP47 code of the original Language of the file. Example:en-GB (English, United Kingdom).
You can find the list of all available languages in our /languages endpoint.
If you are using a project template with a source language already defined, you can skip this parameter.
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.

targetLanguages string

BCP47 codes separated by commas for the languages your file is to be translated. Example:es-ES,it-IT,dk.
You can find the list of all available languages in our /languages endpoint.
If you are using a project template with a list of target languages already defined, you can skip this parameter.
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.

Header Parameters
callbackUrl string

An optional URL where you want to receive a notification when the file is translated.
The notification will be sent as a POST request with the file details.
The URL must be absolute with the HTTPS scheme and must not exceed 256 characters in length.
You can find more information in our webhooks guide.

X-preview string

An optional URL to a publicly accessible page with the file preview.
The preview function shows our experts how the original content (in source language) is integrated in the overall layout, including styles and images.

Caution
  • The page provided must be fully accessible without any authorization.
  • The URL must be absolute with the HTTP or HTTPS scheme and must not exceed 256 characters in length.
Request Body
string
Responses
201

File added to the project

Schema OPTIONAL
fileId string OPTIONAL
fileName string OPTIONAL
projectId integer OPTIONAL