POST
/
v2
/
documents
/
files
Upload a File
curl --request POST \
  --url https://api.lilt.com/v2/documents/files \
  --header 'Content-Type: application/octet-stream' \
  --header 'name: <name>' \
  --header 'project_id: <project_id>'
{
  "id": 46530,
  "project_id": 287,
  "srclang": "en",
  "trglang": "de",
  "name": "Introduction.xliff",
  "import_in_progress": false,
  "import_succeeded": false,
  "import_error_message": "Could not parse XML.",
  "export_in_progress": false,
  "export_succeeded": false,
  "export_error_message": "Could not parse XML.",
  "is_pretranslating": false,
  "status": {
    "pretranslation": "idle"
  },
  "translator_email": "translator@example.com",
  "reviewer_email": "reviewer@example.com",
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "is_review_complete": true,
  "segments": [
    {
      "id": 84480010,
      "created_at": 1489147692,
      "updated_at": 1489147692,
      "document_id": 1234,
      "memory_id": 5678,
      "source": "The red bus.",
      "srclang": "en",
      "target": "Le bus rouge.",
      "trglang": "fr",
      "is_confirmed": true,
      "is_reviewed": true
    }
  ]
}

Authorizations

key
string
query
required

Headers

name
string
required

A file name.

project_id
integer
required

A unique Project identifier.

pretranslate
string

An optional parameter indicating if and how the document will be pretranslated upon being uploaded. The accepted values are TM, or TM+MT

auto_accept
boolean

An optional parameter to auto-accept segments with 100% translation memory matches when the pretranslate option is also set, or to auto-accept any target data that is present when the uploaded file is XLIFF. If omitted it will default to your organization settings for Accept and lock exact matches, if set to false, no segments will be auto-accepted.

case_sensitive
boolean

An optional parameter to use case sensitive translation memory matching when the pretranslate option is also enabled. Matches must have identical character-by-character case to qualify as matches. Default value matches your organization settings for Use case sensitive translation memory matching setting

match_attribution
boolean

An optional parameter to attribute translation authorship of exact matches to the author of the file when the pretranslate option is also enabled. Default value matches your organization settings for Translation authorship setting

config_id
integer

An optional pararameter to specify an import configuration to be applied when extracting translatable content from this file.

Body

application/octet-stream · file

The file contents to be uploaded. The entire POST body will be treated as the file.

The body is of type file.

Response

200
application/json

A Document object.

A Document is a collection of zero or more Segments.