Lilt REST API API Reference

The Lilt REST API enables programmatic access to the full-range of Lilt backend services including:

  • Training of and translating with interactive, adaptive machine translation
  • Large-scale translation memory
  • The Lexicon (a large-scale termbase)
  • Programmatic control of the Lilt CAT environment
  • Translation memory synchronization

Requests and responses are in JSON format. The REST API only responds to HTTPS / SSL requests.

Authentication

Requests are authenticated via REST API key, which requires the Business plan.

Requests are authenticated using HTTP Basic Auth. Add your REST API key as both the username and password.

For development, you may also pass the REST API key via the key query parameter. This is less secure than HTTP Basic Auth, and is not recommended for production use.

API Endpoint
https://lilt.com/2
Contact: support@lilt.com
Request Content-Types: application/json
Response Content-Types: application/json
Schemes: https
Version: v2.0

Authentication

BasicAuth

type
basic

ApiKeyAuth

type
apiKey
in
query
name
key

Root

Retrieve the REST API root

GET /

This resource does not have any attributes. It lists the name of the REST API.

This endpoint can be used to verify REST API keys and to check the availability of the REST API.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "api_name": "Lilt REST API v2",
  "api_root": "/2"
}
Response Example (default )
{
  "message": "Internal server error."
}

Files

Retrieve a File

GET /files

Retrieves one or more files available to your user. Files are not associated with a project or a memory. They are unprocessed and can be used later in the project/document creation workflow step.

To retrieve a specific file, specify the id request parameter. To retrieve all files, omit the id request parameter.

Example CURL command: curl -X GET https://lilt.com/2/files?key=API_KEY&id=274

id: integer
in query

A unique File identifier.

A list of files.

403 Forbidden

Unauthorized.

410 Gone

File deleted.

Unexpected error.

Response Content-Types: application/json
Response Example (200 OK)
[
  {
    "id": 46530,
    "name": "en_US.json",
    "file_hash": "3858f62230ac3c915f300c664312c63f",
    "detected_lang": "de",
    "detected_lang_confidence": 0.7,
    "category": "REFERENCE",
    "labels": [],
    "created_at": 1489147692,
    "updated_at": 1489147692
  }
]
Response Example (default )

Upload a File

POST /files

Upload a File in any of the formats documented in our knowledge base. Request parameters should be passed in as query string parameters.

Example CURL command:

  curl -X POST https://lilt.com/2/files?key=API_KEY&name=en_US.json \
  --header "Content-Type: application/octet-stream" \
  --data-binary @en_US.json

Calls to GET /files are used to monitor the language detection results. The API response will be augmented to include detected language and confidence score.

The language detection will complete asynchronously. Prior to completion, the detected_lang value will be zxx, the reserved ISO 639-2 code for "No linguistic content/not applicable".

If the language can not be determined, or the detection process fails, the detected_lang field will return und, the reserved ISO 639-2 code for undetermined language, and the detected_lang_confidence score will be 0.

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

name: string
in query

A file name.

file_hash: string
in query

A hash value to associate with the file. The MD5 hash of the body contents will be used by default if a value isn't provided.

langId: boolean
in query

Flag indicating whether to perform language detection on the uploaded file. Default is false.

project_id: integer
in query

The project to associate the uploaded file with.

category: string
in query

The category of the file. The options are REFERENCE, or API. The default is API. Files with the REFERENCE category will be displayed as reference material.

labels: string
in query

Comma-separated list of labels to add to the uploaded document.

Request Content-Types: application/octet-stream
Request Example
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xliff xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">\n...\n</xliff>"

A SourceFile object.

Unexpected error

Response Example (201 Created)
{
  "id": 46530,
  "name": "en_US.json",
  "file_hash": "3858f62230ac3c915f300c664312c63f",
  "detected_lang": "de",
  "detected_lang_confidence": 0.7,
  "category": "REFERENCE",
  "labels": [],
  "created_at": 1489147692,
  "updated_at": 1489147692
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a File

DELETE /files

Delete a File.

Example CURL command:

  curl -X DELETE https://lilt.com/2/files?key=API_KEY&id=123 ```

id: integer
in query

A unique File identifier.

204 No Content

A status object.

type
object

Unexpected error

Response Example (204 No Content)
{
  "id": 12345,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Comments

Retrieve a document's comments by segment

GET /comments

Retrieves all comments associated with a specified document, grouped by their Segment's ID.

To retrieve a document's comments, specify the document_id request parameter.

Example CURL command:

  curl -X GET https://lilt.com/2/comments?key=API_KEY&document_id=123
document_id: integer
in query

A unique document identifier.

An object containing lists of comments identified by the id of the segment to which they belong.

403 Forbidden

Unauthorized.

410 Gone

Comment deleted.

Unexpected error.

Response Example (200 OK)
{
  "1234567": [
    {
      "id": 84480010,
      "text": "This is incorrect.",
      "annotations": [
        {
          "text": "mistranslation"
        }
      ],
      "is_resolved": true,
      "document_id": 5678,
      "segment_id": 5678,
      "segment_revision_id": 5678,
      "user_id": 5678,
      "created_at": 1489147692
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Create a new comment

POST /comments

Create a new comment for the specified Segment ID.

The comment being created

document_id: integer
in query

A unique document identifier.

segment_id: integer
in query

A unique segment identifier.

Request Content-Types: application/json
Request Example
{
  "text": "Please update this segment",
  "annotations": [
    {
      "text": "mistranslation"
    }
  ],
  "isResolved": false
}

A Comment object.

Unexpected error

Response Example (201 Created)
{
  "id": 84480010,
  "text": "This is incorrect.",
  "annotations": [
    {
      "text": "mistranslation"
    }
  ],
  "is_resolved": true,
  "document_id": 5678,
  "segment_id": 5678,
  "segment_revision_id": 5678,
  "user_id": 5678,
  "created_at": 1489147692
}
Response Example (default )
{
  "message": "Internal server error."
}

Update an existing comment

PUT /comments

Update an existing comment.

The comment being updated.

comment_id: integer
in query

A unique comment identifier.

document_id: integer
in query

A unique document identifier.

Request Content-Types: application/json
Request Example
{
  "text": "Please update this segment",
  "annotations": [
    {
      "text": "mistranslation"
    }
  ],
  "isResolved": false
}

A Comment object.

Unexpected error

Response Example (201 Created)
{
  "id": 84480010,
  "text": "This is incorrect.",
  "annotations": [
    {
      "text": "mistranslation"
    }
  ],
  "is_resolved": true,
  "document_id": 5678,
  "segment_id": 5678,
  "segment_revision_id": 5678,
  "user_id": 5678,
  "created_at": 1489147692
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Comment

DELETE /comments

Delete a Comment.

Example CURL command:

  curl -X DELETE https://lilt.com/2/comments?key=API_KEY&comment_id=123
comment_id: integer
in query

A unique Comment identifier.

204 No Content

A status object.

type
object

Unexpected error

Response Example (204 No Content)
{
  "id": 12345
}
Response Example (default )
{
  "message": "Internal server error."
}

Connectors

Retrieve a Connector

GET /connectors

Retrieves one or more connectors available to your user. Connectors are not associated with a project or a memory.

To retrieve a specific connector, specify the id request parameter. To retrieve all connectors, omit the id request parameter.

Example CURL command: curl -X GET https://lilt.com/2/connectors?key=API_KEY&id=274

id: integer
in query

A unique Connector identifier.

A list of Connectors.

403 Forbidden

Unauthorized.

410 Gone

Connector deleted.

Unexpected error.

Response Example (200 OK)
[
  {
    "id": "integer",
    "name": "string",
    "schedule": "string",
    "last_check": "string",
    "healthy": "boolean",
    "args": "object",
    "created_at": "string",
    "updated_at": "string"
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Upload a Connector

POST /connectors

Create a new connector linked to a supported external cms.

Connector arguments.

name: string

Name of connector.

args: object

Connector parameters.

schedule: string

Cron string

Request Content-Types: application/json
Request Example
{
  "name": "string",
  "args": "object",
  "schedule": "0 0 * * *"
}

A Connector object.

Unexpected error

Response Example (201 Created)
{
  "id": "integer",
  "name": "string",
  "schedule": "string",
  "last_check": "string",
  "healthy": "boolean",
  "args": "object",
  "created_at": "string",
  "updated_at": "string"
}
Response Example (default )
{
  "message": "Internal server error."
}

Upload a Connector

PUT /connectors

Create a new connector linked to a supported external content source.

Connector arguments.

id: integer

A unique Connector identifier.

name: string

Name of connector.

args: object

Connector parameters.

schedule: string

Cron string

Request Content-Types: application/json
Request Example
{
  "id": 46530,
  "name": "zendesk",
  "args": "object",
  "schedule": "0 0 * * *"
}

A Connector object.

Unexpected error

Response Example (201 Created)
{
  "id": "integer",
  "name": "string",
  "schedule": "string",
  "last_check": "string",
  "healthy": "boolean",
  "args": "object",
  "created_at": "string",
  "updated_at": "string"
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Connector

DELETE /connectors

Delete a Connector.

Example CURL command:

  curl -X DELETE https://lilt.com/2/connectors?key=API_KEY&id=123 ```

id: integer
in query

A unique Connector identifier.

204 No Content

A status object.

type
object

Unexpected error

Response Example (204 No Content)
{
  "id": 12345,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Sync a Connector

POST /connectors/sync

Request an import job for the given connector ID. This will check the target system for new content to pull into Lilt.

Example CURL command:

 curl -X GET https://lilt.com/2/connectors/sync?key=API_KEY&id=128
id: integer
in query

A unique Connector identifier.

A Connector Job object.

Unexpected error

Response Example (201 Created)
{
  "id": "integer",
  "status": "string",
  "args": "object",
  "created_at": "string",
  "updated_at": "string"
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Connector Job

GET /connectors/jobs

Retrieves a connector job available to your user. Use this to check the status of jobs started by the /connectors/sync and /connectors/jobs/deliver endpoints.

Example CURL command:

 curl -X GET https://lilt.com/2/connectors/jobs?key=API_KEY&id=9274
id: integer
in query

A unique Connector Job identifier.

A list of Connector Jobs.

Unexpected error

Response Example (200 OK)
[
  {
    "id": "integer",
    "status": "string",
    "args": "object",
    "created_at": "string",
    "updated_at": "string"
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Deliver a Connector Job

POST /connectors/jobs/deliver

Request an export job for the given connector job ID. This will check Lilt for completed projects that are associated with this job and deliver them to the target system.

Example CURL command:

 curl -X POST https://lilt.com/2/connectors/jobs/deliver?key=API_KEY&id=9274
id: integer
in query

A unique Connector Job identifier.

200 OK

A success status code.

Unexpected error

Response Example (default )
{
  "message": "Internal server error."
}

ConverterConfig

List Converter Configs

GET /configs/converter

List all file filter configurations for your Organization.

organizationId: integer
in query

A unique Organization identifier.

A map of config id to string escaped config json.

Unexpected error

Response Example (200 OK)
{
  "145": "{\"registry\": {\".xlsx\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_openxml\", \"filterConfig\": \"#v1\\nbPreferenceTranslateDocProperties.b=false\\nbPreferenceTranslateComments.b=true\\nbPreferenceTranslatePowerpointNotes.b=true\\nbPreferenceTranslatePowerpointMasters.b=true\\nbPreferenceIgnorePlaceholdersInPowerpointMasters.b=false\\nbPreferenceTranslateWordHeadersFooters.b=true\\nbPreferenceTranslateWordHidden.b=false\\nbPreferenceTranslateWordExcludeGraphicMetaData.b=true\\nbPreferenceTranslatePowerpointHidden.b=false\\nbPreferenceTranslateExcelHidden.b=false\\nbPreferenceTranslateExcelExcludeColors.b=false\\nbPreferenceTranslateExcelExcludeColumns.b=false\\nbPreferenceTranslateExcelSheetNames.b=false\\nbPreferenceAddLineSeparatorAsCharacter.b=false\\nsPreferenceLineSeparatorReplacement=$0a$\\nbPreferenceReplaceNoBreakHyphenTag.b=false\\nbPreferenceIgnoreSoftHyphenTag.b=false\\nbPreferenceAddTabAsCharacter.b=false\\nbPreferenceAggressiveCleanup.b=true\\nbPreferenceAutomaticallyAcceptRevisions.b=true\\nbPreferencePowerpointIncludedSlideNumbersOnly.b=false\\nbPreferenceTranslateExcelDiagramData.b=false\\nbPreferenceTranslateExcelDrawings.b=false\\nsubfilter=okf_plaintext\\nbInExcludeMode.b=true\\nbInExcludeHighlightMode.b=true\\nbPreferenceTranslateWordExcludeColors.b=false\\nbReorderPowerpointNotesAndComments.b=true\\ntsComplexFieldDefinitionsToExtract.i=1\\ncfd0=HYPERLINK\\ntsExcelExcludedColors.i=0\\ntsExcelExcludedColumns.i=0\\ntsExcludeWordStyles.i=0\\ntsWordHighlightColors.i=0\\ntsWordExcludedColors.i=0\\ntsPowerpointIncludedSlideNumbers.i=0\\nbExtractExternalHyperlinks.b=false\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}}",
  "432": "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}"
}
Response Example (default )
{
  "message": "Internal server error."
}

Add Converter Config

PUT /configs/converter

Add a file filter configuration for your Organization.

The file filter configuration to create.

configJson: string

The configuration json blob, string escaped.

configName: string

The user defined name of your configuration.

configDescription: string

A description for the configuration.

organizationId: integer
in query

A unique Organization identifier.

Request Content-Types: application/json
Request Example
{
  "configJson": "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}",
  "configName": "my_config",
  "configDescription": "config for custom markdown escaping"
}
200 OK

The config id of the configuration created.

type
object

Unexpected error

Response Example (200 OK)
{
  "configId": "integer"
}
Response Example (default )
{
  "message": "Internal server error."
}

Fetch Converter Config by Id

GET /configs/converter/{configId}

Fetch a file filter configuration by id.

configId: integer
in path

A unique configuration identifier.

A map of config id to string escaped config json.

Unexpected error

Response Example (200 OK)
{
  "145": "{\"registry\": {\".xlsx\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_openxml\", \"filterConfig\": \"#v1\\nbPreferenceTranslateDocProperties.b=false\\nbPreferenceTranslateComments.b=true\\nbPreferenceTranslatePowerpointNotes.b=true\\nbPreferenceTranslatePowerpointMasters.b=true\\nbPreferenceIgnorePlaceholdersInPowerpointMasters.b=false\\nbPreferenceTranslateWordHeadersFooters.b=true\\nbPreferenceTranslateWordHidden.b=false\\nbPreferenceTranslateWordExcludeGraphicMetaData.b=true\\nbPreferenceTranslatePowerpointHidden.b=false\\nbPreferenceTranslateExcelHidden.b=false\\nbPreferenceTranslateExcelExcludeColors.b=false\\nbPreferenceTranslateExcelExcludeColumns.b=false\\nbPreferenceTranslateExcelSheetNames.b=false\\nbPreferenceAddLineSeparatorAsCharacter.b=false\\nsPreferenceLineSeparatorReplacement=$0a$\\nbPreferenceReplaceNoBreakHyphenTag.b=false\\nbPreferenceIgnoreSoftHyphenTag.b=false\\nbPreferenceAddTabAsCharacter.b=false\\nbPreferenceAggressiveCleanup.b=true\\nbPreferenceAutomaticallyAcceptRevisions.b=true\\nbPreferencePowerpointIncludedSlideNumbersOnly.b=false\\nbPreferenceTranslateExcelDiagramData.b=false\\nbPreferenceTranslateExcelDrawings.b=false\\nsubfilter=okf_plaintext\\nbInExcludeMode.b=true\\nbInExcludeHighlightMode.b=true\\nbPreferenceTranslateWordExcludeColors.b=false\\nbReorderPowerpointNotesAndComments.b=true\\ntsComplexFieldDefinitionsToExtract.i=1\\ncfd0=HYPERLINK\\ntsExcelExcludedColors.i=0\\ntsExcelExcludedColumns.i=0\\ntsExcludeWordStyles.i=0\\ntsWordHighlightColors.i=0\\ntsWordExcludedColors.i=0\\ntsPowerpointIncludedSlideNumbers.i=0\\nbExtractExternalHyperlinks.b=false\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}}",
  "432": "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}"
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete Converter Config

DELETE /configs/converter/{configId}

Delete a file filter configuration by id.

configId: integer
in path

A unique configuration identifier.

200 OK

The config id of the configuration deleted.

type
object

Unexpected error

Response Example (200 OK)
{
  "configId": "integer"
}
Response Example (default )
{
  "message": "Internal server error."
}

Add Filter Mapping

PUT /configs/converter/{configId}/{fileExtension}

Add a specific filter mapping to your file filter configuration

The file filter mapping to create.

registryEntryJson: string

The filter mapping json blob, string escaped.

configName: string

The user defined name of your configuration.

configDescription: string

A description for the configuration.

configId: integer
in path

A unique configuration identifier.

fileExtension: string
in path

A file extension for the filter mapping.

Request Content-Types: application/json
Request Example
{
  "registryEntryJson": "{\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}",
  "configName": "my_config",
  "configDescription": "config for custom markdown escaping"
}

A map of config id to string escaped config json.

Unexpected error

Response Example (200 OK)
{
  "145": "{\"registry\": {\".xlsx\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_openxml\", \"filterConfig\": \"#v1\\nbPreferenceTranslateDocProperties.b=false\\nbPreferenceTranslateComments.b=true\\nbPreferenceTranslatePowerpointNotes.b=true\\nbPreferenceTranslatePowerpointMasters.b=true\\nbPreferenceIgnorePlaceholdersInPowerpointMasters.b=false\\nbPreferenceTranslateWordHeadersFooters.b=true\\nbPreferenceTranslateWordHidden.b=false\\nbPreferenceTranslateWordExcludeGraphicMetaData.b=true\\nbPreferenceTranslatePowerpointHidden.b=false\\nbPreferenceTranslateExcelHidden.b=false\\nbPreferenceTranslateExcelExcludeColors.b=false\\nbPreferenceTranslateExcelExcludeColumns.b=false\\nbPreferenceTranslateExcelSheetNames.b=false\\nbPreferenceAddLineSeparatorAsCharacter.b=false\\nsPreferenceLineSeparatorReplacement=$0a$\\nbPreferenceReplaceNoBreakHyphenTag.b=false\\nbPreferenceIgnoreSoftHyphenTag.b=false\\nbPreferenceAddTabAsCharacter.b=false\\nbPreferenceAggressiveCleanup.b=true\\nbPreferenceAutomaticallyAcceptRevisions.b=true\\nbPreferencePowerpointIncludedSlideNumbersOnly.b=false\\nbPreferenceTranslateExcelDiagramData.b=false\\nbPreferenceTranslateExcelDrawings.b=false\\nsubfilter=okf_plaintext\\nbInExcludeMode.b=true\\nbInExcludeHighlightMode.b=true\\nbPreferenceTranslateWordExcludeColors.b=false\\nbReorderPowerpointNotesAndComments.b=true\\ntsComplexFieldDefinitionsToExtract.i=1\\ncfd0=HYPERLINK\\ntsExcelExcludedColors.i=0\\ntsExcelExcludedColumns.i=0\\ntsExcludeWordStyles.i=0\\ntsWordHighlightColors.i=0\\ntsWordExcludedColors.i=0\\ntsPowerpointIncludedSlideNumbers.i=0\\nbExtractExternalHyperlinks.b=false\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}}",
  "432": "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}"
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete Filter Mapping

DELETE /configs/converter/{configId}/{fileExtension}

Delete a file filter mapping by id and file extension.

configId: integer
in path

A unique configuration identifier.

fileExtension: string
in path

A file extension to delete.

A map of config id to string escaped config json.

Unexpected error

Response Example (200 OK)
{
  "145": "{\"registry\": {\".xlsx\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_openxml\", \"filterConfig\": \"#v1\\nbPreferenceTranslateDocProperties.b=false\\nbPreferenceTranslateComments.b=true\\nbPreferenceTranslatePowerpointNotes.b=true\\nbPreferenceTranslatePowerpointMasters.b=true\\nbPreferenceIgnorePlaceholdersInPowerpointMasters.b=false\\nbPreferenceTranslateWordHeadersFooters.b=true\\nbPreferenceTranslateWordHidden.b=false\\nbPreferenceTranslateWordExcludeGraphicMetaData.b=true\\nbPreferenceTranslatePowerpointHidden.b=false\\nbPreferenceTranslateExcelHidden.b=false\\nbPreferenceTranslateExcelExcludeColors.b=false\\nbPreferenceTranslateExcelExcludeColumns.b=false\\nbPreferenceTranslateExcelSheetNames.b=false\\nbPreferenceAddLineSeparatorAsCharacter.b=false\\nsPreferenceLineSeparatorReplacement=$0a$\\nbPreferenceReplaceNoBreakHyphenTag.b=false\\nbPreferenceIgnoreSoftHyphenTag.b=false\\nbPreferenceAddTabAsCharacter.b=false\\nbPreferenceAggressiveCleanup.b=true\\nbPreferenceAutomaticallyAcceptRevisions.b=true\\nbPreferencePowerpointIncludedSlideNumbersOnly.b=false\\nbPreferenceTranslateExcelDiagramData.b=false\\nbPreferenceTranslateExcelDrawings.b=false\\nsubfilter=okf_plaintext\\nbInExcludeMode.b=true\\nbInExcludeHighlightMode.b=true\\nbPreferenceTranslateWordExcludeColors.b=false\\nbReorderPowerpointNotesAndComments.b=true\\ntsComplexFieldDefinitionsToExtract.i=1\\ncfd0=HYPERLINK\\ntsExcelExcludedColors.i=0\\ntsExcelExcludedColumns.i=0\\ntsExcludeWordStyles.i=0\\ntsWordHighlightColors.i=0\\ntsWordExcludedColors.i=0\\ntsPowerpointIncludedSlideNumbers.i=0\\nbExtractExternalHyperlinks.b=false\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}}",
  "432": "{\"registry\": {\".md\": {\"type\": \"OkapiFprm\", \"version\": 1, \"filterName\": \"okf_markdown\", \"filterConfig\": \"#v1\\nuseCodeFinder.b=false\\ntranslateUrls.b=true\\nurlToTranslatePattern=.+\\ntranslateCodeBlocks.b=false\\ntranslateInlineCodeBlocks.b=true\\ntranslateHeaderMetadata.b=true\\ntranslateImageAltText.b=true\\nuseLinkSubflow.b=true\\ncodeFinderRules.count.i=1\\ncodeFinderRules.rule0=\\\\{\\\\{[^}]+\\\\}\\\\}\\ncodeFinderRules.sample={{#test}} handle bar test {{/test}}$0a${{stand-alone handle bar}}$0a$\\ncodeFinderRules.useAllRulesWhenTesting.b=true\\n\", \"extractAllTags\": true, \"exportReplacements\": {\"patterns\": [], \"replacements\": []}, \"importReplacements\": {\"patterns\": [], \"replacements\": []}}}"
}
Response Example (default )
{
  "message": "Internal server error."
}

Documents

Create a Document

POST /documents

Create a new Document. A Document is a collection of one or more Segments. Documents are nested inside of Projects, and appear in the Project details view in the web app. Document-level relationships between Segments are considered by the machine translation system during adaptation. If there is no inherent document structure in your data, you still might consider grouping related Segments into Documents to improve translation quality.

The Document resource to create.

name: string

The document name.

project_id: integer

A unique Project identifier.

Request Content-Types: application/json
Request Example
{
  "name": "Introduction.xliff",
  "project_id": 23618
}

A Document object.

Unexpected error

Response Example (200 OK)
{
  "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,
  "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Document

GET /documents

List a Document.

The listing will include the pretranslation status for the document. When pretranslation is in progress for a document, the GET /documents endpoint's response will include is_pretranslating = true as well as a more detailed status property status.pretranslation one of idle, pending, or running.

id: integer
in query

A unique Document identifier.

with_segments: boolean
in query

Flag indicating whether full segment information should be returned.

A Document object.

Unexpected error

Response Example (200 OK)
{
  "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,
  "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Update a Document

PUT /documents

Update a Document.

The Document resource to update.

id: integer

A unique Document identifier.

name: string

The Document name.

Request Content-Types: application/json
Request Example
{
  "id": 46530,
  "name": "Introduction to our App"
}

A Document object.

Unexpected error

Response Example (200 OK)
{
  "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,
  "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Document

DELETE /documents

Delete a Document.

id: integer
in query

A unique Document identifier.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 46530,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Assign a Document

PUT /documents/share

Assign and unassign a Document for translation and/or review.

Attributes of the Document resource to assign.

id: integer

A unique Document identifier.

email: string

An email address.

is_translator: boolean

If true, assign for translating. If false, then unassign.

is_reviewer: boolean

If true, assign for reviewing. If false, then unassign.

due_date: string (date-time)

Due date for translation or review (set based on is_translator and is_reviewer flags).

Request Content-Types: application/json
Request Example
{
  "id": 46530,
  "email": "user@email.com",
  "is_translator": true,
  "is_reviewer": false,
  "due_date": "2019-10-16T22:12:34.000Z"
}
200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 46530
}
Response Example (default )
{
  "message": "Internal server error."
}

Pretranslate a Document

POST /documents/pretranslate

Initiate pretranslation of a list of Documents. This request will mark document(s) as being pretranslated. Pretranslation in this context is:

  • Applying and confirming exact TM matches based on the Memory of the Project;
  • Translating all other segments via MT without confirming them.

Example CURL command:

curl -X POST https://lilt.com/2/documents/pretranslate?key=API_KEY -d {"id": [123]} -H "Content-Type: application/json"

Document translation is an asynchronous process that, in effect, is performed in the background.

To check the status of pretranslation for a document, use the GET /documents endpoint. When pretranslation is in progress for a document, the GET /documents endpoint's response will include is_pretranslating = true as well as a more detailed status property status.pretranslation one of idle, pending, or running.

Once pretranslation is finished, the document can be downloaded via GET /documents/files.

A list of unique Document identifiers.

id: integer[]

A list of unique Document identifiers.

integer
auto_accept: boolean

Optional parameter for auto-accepting 100% TM hits.

case_sensitive: boolean

Optional for using case matching against TM hits..

attribute_to_creator: boolean

Optional parameter for attributing translation authorship of exact matches to document creator.

mode: string

An optional parameter indicating how the document will be pretranslated.

The accepted values are tm, or tm+mt. Default is tm.

auto_accept: boolean
in query

Deprecated, use body param instead. Optional parameter for auto-accepting 100% TM hits.

case_sensitive: boolean
in query

Deprecated, use body param instead. Optional for using case matching against TM hits.

attribute_to_creator: boolean
in query

Deprecated, use body param instead. Optional parameter for attributing translation authorship of exact matches to document creator.

mode: string
in query

Deprecated, use body param instead. An optional parameter indicating how the document will be pretranslated.

The accepted values are tm, or tm+mt. Default is tm.

Request Content-Types: application/json
Request Example
{
  "id": [
    123,
    234
  ],
  "auto_accept": false,
  "case_sensitive": false,
  "attribute_to_creator": false,
  "mode": "tm+mt"
}
202 Accepted

A status object.

type
object

Unexpected error

Response Example (202 Accepted)
{
  "id": [
    123,
    234
  ],
  "is_pretranslating": true,
  "documents": [
    {
      "id": 123,
      "import_in_progress": false,
      "import_succeeded": true,
      "import_error_message": "",
      "is_processing": false,
      "is_pretranslating": true,
      "status": {
        "pretranslation": "running"
      }
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Download a Document

GET /documents/files

Export a Document that has been translated in the Lilt web application. Any Document can be downloaded in XLIFF 1.2 format, or can be retrieved in its original uploaded format by setting is_xliff=false. This endpoint will fail if either (a) export or (b) pre-translation operations are in-progress. The status of those operations can be determined by retrieving the Document resource. Example CURL command:

  curl -X GET https://lilt.com/2/documents/files?key=API_KEY&id=274 -o from_lilt.xliff
id: integer
in query

An unique Document identifier.

is_xliff: boolean true
in query

Download the document in XLIFF 1.2 format.

200 OK

A file.

type
string (byte)
502 Bad Gateway

File in pretranslation.

Unexpected error

Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Response Example (default )
{
  "message": "Internal server error."
}

Upload a File

POST /documents/files

Create a Document from a file in any of the formats documented in our knowledge base. Request parameters should be passed as JSON object with the header field LILT-API.

File names in the header can only contain US-ASCII characters. File names with characters outside of US-ASCII should be URI encoded or transliterated to US-ASCII strings.

Example CURL command:

  curl -X POST https://lilt.com/2/documents/files?key=API_KEY \
  --header "LILT-API: {\"name\": \"introduction.xliff\",\"pretranslate\": \"tm+mt\",\"project_id\": 9}" \
  --header "Content-Type: application/octet-stream" \
  --data-binary @Introduction.xliff

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

name: string
in header

A file name.

project_id: integer
in header

A unique Project identifier.

pretranslate: string
in header

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
in header

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 or set to false, no segments will be auto-accepted.

case_sensitive: boolean
in header

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 is false

match_attribution: boolean
in header

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 is false

config_id: integer
in header

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

Request Content-Types: application/octet-stream
Request Example
"<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n<xliff xmlns=\"urn:oasis:names:tc:xliff:document:1.2\">\n...\n</xliff>"

A Document object.

Unexpected error

Response Example (200 OK)
{
  "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,
  "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Unlock documents

POST /documents/done/unlock

Unlock documents for translation. Sets document "Translation Done" and "Review Done" to false.

Example curl:

  curl --X --request POST 'https://lilt.com/2/documents/done/unlock?key=API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "documentIds": [23921, 23922]
  }'

document ids to update

documentIds: number[]

array of document ids

Request Example
{
  "documentIds": [
    10641,
    10642
  ]
}
200 OK

array of updated documents

type
array
Response Example (200 OK)
"array"

Mark translation done

POST /documents/done/translation

Mark the translation of documents as done/undone in bulk.

When being marked positively as done:

  • Documents must not already be marked as done and all segments must be confirmed.
  • This request will also trigger an email notification to a document's assigned reviewer that the document is ready for review.

When being marked as un-done:

  • Documents must not be marked as complete for review.

Example curl:

  curl --X --request POST 'https://lilt.com/2/documents/done/translation?key=API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "documentIds": [23921, 23922],
      "isDone": true
  }'

document ids to update

documentIds: number[]

array of document ids

isDone: boolean
Request Example
{
  "documentIds": [
    10641,
    10642
  ],
  "isDone": true
}
200 OK

array of updated documents

type
array
Response Example (200 OK)
"array"

Mark review done

POST /documents/done/review

Mark the review of documents as done/undone in bulk.

When being marked positively as done:

  • Documents must not already be marked as done for review.
  • Documents must already be marked as done for translation.
  • This request will also trigger an email notification.

Example curl:

  curl --X --request POST 'https://lilt.com/2/documents/done/review?key=API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "documentIds": [23921, 23922],
      "isDone": true
  }'

document ids to update

documentIds: number[]

array of document ids

isDone: boolean
Request Example
{
  "documentIds": [
    10641,
    10642
  ],
  "isDone": true
}
200 OK

array of updated documents

type
array
Response Example (200 OK)
"array"

Languages

Retrieve supported languages

GET /languages

Get a list of supported languages.

200 OK

An object listing supported languages and their corresponding locales.

type
object

Unexpected error

Response Example (200 OK)
{
  "source_to_target": {
    "en": {
      "da": true,
      "de": true,
      "fr": true,
      "...": "..."
    },
    "...": "..."
  },
  "code_to_name": {
    "aa": "Afar",
    "ab": "Abkhazian",
    "af": "Afrikaans",
    "...": "..."
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Lexicon

Update a Lexicon

POST /lexicon

Update the Lexicon (Termbase as displayed in the ui) with a new term. The maximum source length is 250 characters.

The lexicon entry.

memory_id: integer

A unique Memory identifier.

source: string

The source side of the lexicon entry.

target: string

The target side of the lexicon entry.

Request Content-Types: application/json
Request Example
{
  "memory_id": 10641,
  "source": "washing machine",
  "target": "Waschmaschine"
}
200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "memory_id": 46530,
  "success": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Query a Lexicon

GET /lexicon

Query the Lexicon. The Lexicon is an editable termbase / concordance that is integrated with the Memory.

memory_id: integer
in query

A unique Memory identifier.

srclang: string
in query

An ISO 639-1 language code.

trglang: string
in query

An ISO 639-1 language code.

query: string
in query

The query term.

n: integer 1
in query

The maximum number of results to return.

A list of LexiconEntry objects.

Unexpected error

Response Example (200 OK)
[
  {
    "translations": [],
    "examples": [
      [
        {
          "source": "Waschmaschine",
          "sourceDelimiters": [
            "",
            ""
          ],
          "target": [
            "washing",
            "machine"
          ],
          "targetDelimiters": [
            "",
            " ",
            ""
          ],
          "sourceSpan": {
            "start": 0,
            "length": 1
          },
          "targetSpan": {
            "start": 1,
            "length": 1
          },
          "similarity": 0,
          "memoryId": 10641
        }
      ]
    ]
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Memories

Create a Memory

POST /memories

Create a new Memory. A Memory is a container that collects source/target sentences for a specific language pair (e.g., English>French). The data in the Memory is used to train the MT system, populate the TM, and update the lexicon. Memories are private to your account - the data is not shared across users - unless you explicitly share a Memory with your team (via web app only).

Refer to our KB for a more detailed description.

The Memory resource to create.

name: string

A name for the Memory.

srclang: string

An ISO 639-1 language identifier.

trglang: string

An ISO 639-1 language identifier.

srclocale: string

An ISO 3166-1 region name for language locales

trglocale: string

An ISO 3166-1 region name for language locales

Request Content-Types: application/json
Request Example
{
  "name": "automotive",
  "srclang": "en",
  "trglang": "fr",
  "srclocale": "US",
  "trglocale": "FR"
}

A Memory object.

Unexpected error

Response Example (200 OK)
{
  "id": 1234,
  "srclang": "en",
  "trglang": "fr",
  "srclocale": "US",
  "trglocale": "FR",
  "name": "Acme Corp Support Content",
  "version": 78,
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "num_segments": 1028,
  "resources": [
    "string"
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Memory

GET /memories

Retrieve a Memory. If you cannot access the Memory (401 error) please check permissions (e.g. in case you created the Memory via the web app with a different account you may have to explicitly share that Memory).

id: integer
in query

An optional Memory identifier.

A list of Memory objects.

Unexpected error

Response Example (200 OK)
[
  {
    "id": 1234,
    "srclang": "en",
    "trglang": "fr",
    "srclocale": "US",
    "trglocale": "FR",
    "name": "Acme Corp Support Content",
    "version": 78,
    "created_at": 1489147692,
    "updated_at": 1489147692,
    "num_segments": 1028,
    "resources": [
      "string"
    ]
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Update the name of a Memory

PUT /memories

Update a Memory.

The Memory resource to update.

id: integer

A unique Memory identifier.

name: string

The Memory name.

Request Content-Types: application/json
Request Example
{
  "id": 7246,
  "name": "Automotive Memory"
}

A Memory object.

Unexpected error

Response Example (200 OK)
{
  "id": 1234,
  "srclang": "en",
  "trglang": "fr",
  "srclocale": "US",
  "trglocale": "FR",
  "name": "Acme Corp Support Content",
  "version": 78,
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "num_segments": 1028,
  "resources": [
    "string"
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Memory

DELETE /memories

Delete a Memory.

id: integer
in query

A unique Memory identifier.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 46530,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Query a Memory

GET /memories/query

Perform a translation memory query.

id: integer
in query

A unique Memory identifier.

query: string
in query

A source query.

n: integer 10
in query

Maximum number of results to return.

A list of TranslationMemoryEntry objects.

Unexpected error

Response Example (200 OK)
[
  {
    "source": "The red bus.",
    "target": "Le bus rouge.",
    "score": 100,
    "metadata": "object"
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Get-sync for a Memory

GET /memories/sync

Get all or part of a memory in TMX 1.4b format. If the from_time and/or to_time are omitted, then all segments are returned. The parameter when specifies on which date field from_time and to_time are matched. Possible values are created (when the segment was originally created in the memory), updated (when the segment was lastly updated), and deleted (when the segment was deleted).

Example CURL command:

  curl -X GET https://lilt.com/2/memories/sync?key=API_KEY&id=42 -o from_lilt.tmx
id: integer
in query

A unique Memory identifier.

from_time: integer
in query

Unix time stamp (epoch, in seconds) of the start of the Memory section.

to_time: integer
in query

Unix time stamp (epoch, in seconds) of the end of the Memory section.

when: string
in query

The date field on which retrieved segments match from/to time stamps: created, updated, deleted. If this parameter is omitted, then the whole Memory is returned.

200 OK

A TMX 1.4b file.

type
string (byte)

Unexpected error

Response Content-Types: application/x-tmx
Response Example (200 OK)
"string (byte)"
Response Example (default )
{
  "message": "Internal server error."
}

Insert-sync for a Memory

POST /memories/sync

Inserts a TM in TMX 1.4b format into the Memory. Request parameters should be passed as JSON object with the header field LILT-API.

Example CURL command:

  curl -X POST https://lilt.com/2/memories/sync?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.tmx\",\"id\": 42}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.tmx

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

id: integer
in header

A unique Memory identifier.

name: string
in header

Name of the TMX file.

Request Content-Types: application/octet-stream
Request Example
"string"
200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 123,
  "num_updates": 107
}
Response Example (default )
{
  "message": "Internal server error."
}

Update-sync for a Memory

PUT /memories/sync

Updates the Memory with given TMX file. Request parameters should be passed as JSON object with the header field LILT-API. The number of segments returned by the from_time, to_time, when parameters and the number of segments in the TMX file need to be identical.

Example CURL command:

  curl -X PUT https://lilt.com/2/memories/sync?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.tmx\", \"id\": 42, \"from_time\": 1491048000, \"to_time\": 1491049800, "when": "Updated"}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.tmx

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

id: integer
in header

A unique Memory identifier.

from_time: integer
in header

Unix time stamp (epoch, in seconds) of the start of the Memory section.

to_time: integer
in header

Unix time stamp (epoch, in seconds) of the end of the Memory section.

when: string
in header

The date field on which retrieved segments match from/to time stamps: created, updated, deleted.

Request Example
"string"
200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 123,
  "num_updates": "num_updates"
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete-sync for a Memory

DELETE /memories/sync

Deletes segments in the Memory matching the from_time, to_time and when parameters.

Example CURL command:

  curl -X DELETE https://lilt.com/2/memories/sync?key=API_KEY&id=42&from_time=1491048000&to_time=1491049800&when=created
id: integer
in query

A unique Memory identifier.

from_time: integer
in query

Unix time stamp (epoch, in seconds) of the start of the Memory section.

to_time: integer
in query

Unix time stamp (epoch, in seconds) of the end of the Memory section.

when: string
in query

The date field on which retrieved segments match from/to time stamps: created, updated, deleted.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 123,
  "num_updates": 107
}
Response Example (default )
{
  "message": "Internal server error."
}

File import for a Memory

POST /memories/import

Imports common translation memory or termbase file formats to a specific Lilt memory. Currently supported file formats are *.tmx, *.sdltm and *.tmq for TM data; *.csv and *.tbx for termbase data. Request parameters should be passed as JSON object with the header field LILT-API.

Example CURL command to upload a translation memory file named my_memory.sdltm in the current working directory:

  curl -X POST https://lilt.com/2/memories/import?key=API_KEY \
    --header "LILT-API: {\"name\": \"my_memory.sdltm\",\"memory_id\": 42}" \
    --header "Content-Type: application/octet-stream" \
    --data-binary @my_memory.sdltm

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

memory_id: integer
in header

A unique Memory identifier.

name: string
in header

Name of the TM or termbase file.

has_header_row: boolean
in header

A flag indicating whether an imported Termbase CSV has a header row or not (the default value is false).

Request Content-Types: application/octet-stream
Request Example
"string (binary)"
200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 123,
  "isProcessing": 1
}
Response Example (default )
{
  "message": "Internal server error."
}

Jobs

Create a Job

POST /jobs

Create a Job. A Job is a collection of Projects. A Job will contain multiple projects, based on the language pair. A Project is associated with exactly one Memory.

Jobs appear in the Jobs dashboard of the web app.

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "fileIds": [5009, 5010, 5011],
  "due": "2022-05-05T10:56:44.985Z",
  "srcLang": "en",
  "srcLocale": "US",
  "languagePairs": [
      { "memoryId": 3121, "trgLang": "de" },
      { "memoryId": 2508, "trgLang": "fr" },
      { "memoryId": 3037, "trgLang": "zh" }
    ]
}'

The Job resource to create.

name: string

A name for the Job.

due: string

An ISO string date.

languagePairs: #/object-definitions/LanguagePair

Language pairs is a set of one or more pairs that includes source language, source locale(optional), target language, target locale(optional), and memoryId.

#/object-definitions/LanguagePair
fileIds: integer[]

A list of file ids to upload to job creation.

integer
Request Content-Types: application/json
Request Example
{
  "name": "My new Job",
  "due": "2021-10-05T14:48:00.000Z",
  "languagePairs": [
    {
      "srcLang": "en",
      "srcLocale": "US",
      "trgLang": "de",
      "trgLocale": "DE",
      "dueDate": "2021-10-03T13:43:00.000Z",
      "memoryId": 1241,
      "pretranslate": "boolean",
      "autoAccept": true,
      "caseSensitive": "boolean",
      "takeMatchAttribution": true,
      "configId": 2332
    }
  ],
  "fileIds": [
    298,
    299
  ]
}

A Job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve all Jobs

GET /jobs

Get all Jobs. You can retrieve all jobs from your account using the above API.

Example CURL command:

curl -X GET 'https://lilt.com/2/jobs?key=API_KEY&isArchived=false'
isArchived: boolean
in query

Retrieves all jobs that are archived.

A list of Job objects.

Unexpected error

Response Example (200 OK)
[
  {
    "name": "My New Job",
    "creationStatus": "COMPLETE",
    "deliveredAt": null,
    "status": "active",
    "due": "2021-06-03T13:43:00.000Z",
    "id": 241,
    "isProcessing": 0,
    "stats": {
      "exactWords": 0,
      "fuzzyWords": 0,
      "newWords": 0,
      "numDeliveredProjects": 0,
      "numLanguagePairs": 0,
      "numProjects": 0,
      "percentReviewed": 0,
      "percentTranslated": 0,
      "projects": [
        {
          "id": "en",
          "srcLang": "en",
          "srcLocale": "US",
          "trgLang": "fr",
          "trgLocale": "CA",
          "name": "My new project",
          "due": "2021-10-03T13:43:00.000Z",
          "isComplete": false,
          "isArchived": false,
          "state": "inProgress",
          "numSourceTokens": 2134,
          "createdAt": "2021-04-01T13:43:00.000Z",
          "updatedAt": "2021-06-03T13:43:00.000Z",
          "isDeleted": false,
          "memoryId": 2134
        }
      ],
      "sourceWords": 0,
      "uniqueLanguagePairs": 1,
      "uniqueLinguists": 1
    }
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Job

GET /jobs/{jobId}

Retrieves a job data along with stats. To retrieve a specific job, you will need the job id in the url path.

Example CURL command:

curl -X GET 'https://lilt.com/2/jobs/{id}?key=API_KEY'
jobId: integer
in path

A job id.

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Update a Job

PUT /jobs/{jobId}

Updates a job with the new job properties. To update a specific job, you will need the job id in the url path.

You can update job's name and due date by passing the property and new value in the body.

Example CURL command:

curl -X PUT 'https://lilt.com/2/jobs/{id}?key=API_KEY' \
--header 'Content-Type: application/json' \
--data-raw '{
  "name": "test job",
  "due": "2022-05-05T10:56:44.985Z"
}'

The Job resource to update.

name: string

A name for the Job.

dueDate: integer

An ISO string date.

id: integer
in path

A job id.

Request Example
{
  "name": "My new Job",
  "dueDate": "2021-10-05T14:48:00.000Z"
}

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Job

DELETE /jobs/{jobId}

Delete a job, deletes all projects and documents in the job, deletes all the segments from all the job's translation memories.

Example CURL command:

curl -X DELETE 'https://lilt.com/2/jobs/{id}?key=API_KEY'
id: integer
in path

A job id.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 241
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve Job Leverage Stats

POST /jobs/{jobId}/stats

Get the TM leverage stats for the job (new/exact/fuzzy matches).

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs/{id}/stats?key=API_KEY'
jobId: integer
in path

A job id.

A job leverage stats object.

Unexpected error

Response Example (200 OK)
{
  "sourceWords": 0,
  "exactWords": 0,
  "fuzzyWords": 0,
  "newWords": 0,
  "projects": [
    {
      "id": 0,
      "sourceWords": 0,
      "exactWords": 0,
      "fuzzyWords": 0,
      "newWords": 0
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Archive a Job

POST /jobs/{jobId}/archive

Set job to archived, unassign all linguists and archive all projects and documents inside the job.

It will return the archived job.

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs/{id}/archive?key=API_KEY'
jobId: integer
in path

A job id.

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Unarchive a Job

POST /jobs/{jobId}/unarchive

Set job to unarchived, the job will move to active status.

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs/{id}/unarchive?key=API_KEY'
jobId: integer
in path

A job id.

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Deliver a Job

POST /jobs/{jobId}/deliver

Set the job state to delivered and set all the projects in the job to done

It will return the delivered job.

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs/{id}/deliver?key=API_KEY'
jobId: integer
in path

A job id.

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Reactivate a Job

POST /jobs/{jobId}/reactivate

Set the job state to active. Does not change the state of projects associated with the given job.

It will return the reactivated job.

Example CURL command:

curl -X POST 'https://lilt.com/2/jobs/{id}/reactivate?key=API_KEY'
jobId: integer
in path

A job id.

A job object.

Unexpected error

Response Example (200 OK)
{
  "name": "My New Job",
  "creationStatus": "COMPLETE",
  "deliveredAt": null,
  "status": "active",
  "due": "2021-06-03T13:43:00.000Z",
  "id": 241,
  "isProcessing": 0,
  "stats": {
    "exactWords": 0,
    "fuzzyWords": 0,
    "newWords": 0,
    "numDeliveredProjects": 0,
    "numLanguagePairs": 0,
    "numProjects": 0,
    "percentReviewed": 0,
    "percentTranslated": 0,
    "projects": [
      {
        "id": "en",
        "srcLang": "en",
        "srcLocale": "US",
        "trgLang": "fr",
        "trgLocale": "CA",
        "name": "My new project",
        "due": "2021-10-03T13:43:00.000Z",
        "isComplete": false,
        "isArchived": false,
        "state": "inProgress",
        "numSourceTokens": 2134,
        "createdAt": "2021-04-01T13:43:00.000Z",
        "updatedAt": "2021-06-03T13:43:00.000Z",
        "isDeleted": false,
        "memoryId": 2134
      }
    ],
    "sourceWords": 0,
    "uniqueLanguagePairs": 1,
    "uniqueLinguists": 1
  }
}
Response Example (default )
{
  "message": "Internal server error."
}

Export a Job

GET /jobs/{jobId}/export

Prepare job files for download. To export translated documents from the job use the query parameter type=files:

Example CURL command:

curl -X GET 'https://lilt.com/2/jobs/{id}/export?key=API_KEY&type=files'

To export job memories use the query parameter type=memory.

The status of the export can be checked by requesting the job GET /jobs/:jobId, job.isProcessing will be 1 while in progress, 0 when idle and -2 when the export failed.

jobId: integer
in path

A job id.

type: string
in query

category for files and memory.

200 OK

200 status.

Unexpected error

Response Example (default )
{
  "message": "Internal server error."
}

Download a Job

GET /jobs/{jobId}/downlod

Make sure you have exported a job with the same id before using this api.

Downloading files requires the exported job id in the param.

Example CURL command:

curl -X GET 'https://lilt.com/2/jobs/{id}/download?key=API_KEY'
jobId: integer
in path

A job id.

200 OK

zipped file

Unexpected error

Response Example (default )
{
  "message": "Internal server error."
}

Projects

Create a Project

POST /projects

Create a Project. A Project is a collection of Documents.

A Project is associated with exactly one Memory.

Projects appear in the dashboard of the web app.

The Project resource to create.

name: string

A name for the Project.

memory_id: integer

The Memory to associate with this new Project.

job_id: integer

The Job to associate with this new Project. If a Job ID is not provided then a new Job will be created to contain the Project.

due_date: integer

The due date. Measured in seconds since the Unix epoch.

metadata: object

A JSON object of key/value string pairs. Stores custom project information.

Request Content-Types: application/json
Request Example
{
  "name": "My new project",
  "memory_id": 1234,
  "job_id": 1234,
  "due_date": 1489147692,
  "metadata": {
    "connectorType": "github",
    "notes": "example metadata"
  }
}

A Project object.

Unexpected error

Response Example (200 OK)
{
  "id": 448,
  "memory_id": 1234,
  "job_id": 1234,
  "srclang": "en",
  "trglang": "fr",
  "srclocale": "US",
  "trglocale": "FR",
  "name": "My New Project",
  "state": "backlog",
  "due_date": 1489147692,
  "archived": false,
  "metadata": {
    "connectorType": "github",
    "notes": "example metadata"
  },
  "sample_review_percentage": 20,
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "document": [
    {
      "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Project

GET /projects

Retrieves one or more projects, including the documents associated with each project. Retrieving a project is the most efficient way to retrieve a single project or a list of all available projects.

To retrieve a specific project, specify the id request parameter. To retrieve all projects, omit the id request parameter. To limit the retrieved projects to those with a particular source language or target language, specify the corresponding ISO 639-1 language codes in the srclang and trglang request parameters, respectively.

id: integer
in query

A unique Project identifier.

srclang: string
in query

An ISO 639-1 language code.

trglang: string
in query

An ISO 639-1 language code.

from_time: integer
in query

Unix time stamp (epoch, in seconds) of Projects with created_at greater than or equal to the value.

to_time: integer
in query

Unix time stamp (epoch, in seconds) of Projects with created_at less than the value.

state: string
in query

A project state (backlog, inProgress, inReview, inQA, done).

archived: boolean
in query

A flag that toggles whether to include archived projects in the response (the default is true).

connector_id: integer
in query

A unique Connector identifier.

A list of Project objects.

Unexpected error

Response Example (200 OK)
[
  {
    "id": 448,
    "memory_id": 1234,
    "job_id": 1234,
    "srclang": "en",
    "trglang": "fr",
    "srclocale": "US",
    "trglocale": "FR",
    "name": "My New Project",
    "state": "backlog",
    "due_date": 1489147692,
    "archived": false,
    "metadata": {
      "connectorType": "github",
      "notes": "example metadata"
    },
    "sample_review_percentage": 20,
    "created_at": 1489147692,
    "updated_at": 1489147692,
    "document": [
      {
        "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
      }
    ]
  }
]
Response Example (default )
{
  "message": "Internal server error."
}

Update a Project

PUT /projects

Update a Project.

The Project resource to update.

id: integer

A unique Project identifier.

name: string

The Project name.

state: string

The project's state. The possible states are 'backlog', 'inProgress', 'inReview', 'inQA', and 'done'

due_date: integer

The due date. Measured in seconds since the Unix epoch.

archived: boolean

True if the project is archived. Otherwise, false.

metadata: object

Metadata associated with a project. This field must be valid JSON.

sample_review_percentage: integer

The Project's sample review percentage. Must be an integer between 10 and 100, a multiple of 10 and greater than minimum value (displayed in error message).

Request Content-Types: application/json
Request Example
{
  "id": 1234,
  "name": "Walker Percy Essays",
  "state": "backlog",
  "due_date": 1489147692,
  "archived": false,
  "metadata": {
    "connectorType": "github",
    "notes": "example metadata"
  },
  "sample_review_percentage": 20
}

A Project object.

Unexpected error

Response Example (200 OK)
{
  "id": 448,
  "memory_id": 1234,
  "job_id": 1234,
  "srclang": "en",
  "trglang": "fr",
  "srclocale": "US",
  "trglocale": "FR",
  "name": "My New Project",
  "state": "backlog",
  "due_date": 1489147692,
  "archived": false,
  "metadata": {
    "connectorType": "github",
    "notes": "example metadata"
  },
  "sample_review_percentage": 20,
  "created_at": 1489147692,
  "updated_at": 1489147692,
  "document": [
    {
      "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
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Project

DELETE /projects

Delete a Project.

id: integer
in query

A unique Project identifier.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 46530,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve Project report

GET /projects/quote

Get information about a project that can be used for quoting. This includes:

  • A translation memory leverage report
  • Word count
  • Segment count
id: integer
in query

A unique Project identifier.

An object that represents a Project quote.

Unexpected error

Response Example (200 OK)
{
  "id": 21902,
  "num_source_words": 8000,
  "num_words_new": 6039,
  "num_segments_new": 151,
  "num_words_repetition": 12,
  "num_segments_repetition": 2980000,
  "bands": [
    {
      "minimum_score": 94,
      "maximum_score": 85,
      "num_source_words": 151,
      "num_segments": 12
    }
  ],
  "documents": [
    {
      "id": 21902,
      "num_source_words": 8000,
      "num_words_new": 6039,
      "num_segments_new": 151,
      "num_words_repetition": 12,
      "num_segments_repetition": 2980000,
      "bands": [
        {
          "minimum_score": 94,
          "maximum_score": 85,
          "num_source_words": 151,
          "num_segments": 12
        }
      ]
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve Project status

GET /projects/status

Retrieve the status of a Project.

id: integer
in query

A unique Project identifier.

An object that represents a Project status report.

Unexpected error

Response Example (200 OK)
{
  "id": 21902,
  "num_source_words": 6039,
  "num_words_confirmed": 151,
  "num_words_reviewed": 12,
  "time_elapsed": 2980000,
  "time_elapsed_translation": 33487,
  "time_elapsed_research": 912348,
  "time_elapsed_review": 66521,
  "resources": [
    {
      "email": "joe.strummer@lilt.com",
      "name": "Joe Strummer",
      "num_words_confirmed": 151,
      "num_words_new": 12,
      "num_words_fuzzy": 24,
      "num_words_exact": 56,
      "num_words_reviewed": 182,
      "time_elapsed": 1172000,
      "time_elapsed_translation": 1172000,
      "time_elapsed_research": 1172000,
      "time_elapsed_review": 1172000,
      "num_segments_confirmed": 25,
      "num_segments_reviewed": 30
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

QA

QA

Perform QA check

GET /qa

Perform QA checks on a target string. Optionally, you can specify a source string for additional bilingual checks, e.g. number consistency.

target: string
in query

A target string to be checked.

trglang: string
in query

An ISO 639-1 language code.

source: string
in query

An optional source string.

srclang: string
in query

An ISO 639-1 language code.

memory_id: integer
in query

Any custom rules defined for this Memory will also be applied as part of the QA check.

A QARuleMatches object.

Unexpected error

Response Example (200 OK)
{
  "matches": [
    {
      "context": {
        "length": 7,
        "offset": 19,
        "text": "This segment has a speling mistake"
      },
      "length": 7,
      "message": "Possible spelling mistake found",
      "offset": 19,
      "replacements": [
        {
          "value": "spelling"
        },
        {
          "value": "spewing"
        },
        {
          "value": "spieling"
        }
      ],
      "rule": {
        "category": {
          "id": "TYPOS",
          "name": "Possible Typo"
        },
        "description": "Possible spelling mistake",
        "id": "MORFOLOGIK_RULE_EN_US",
        "issueType": "misspelling",
        "subId": "",
        "urls": []
      },
      "shortMessage": "Spelling mistake"
    }
  ],
  "custom_rules": [
    {
      "description": "Mistake detected by a custom rule."
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Segments

Create a Segment

POST /segments

Create a Segment and add it to a Memory. A Segment is a source/target pair that is used to train the machine translation system and populate the translation memory. This is not intended to be used on documents and will throw an error.

The maximum source length is 5,000 characters.

The Segment resource to create.

To add a Segment to a Memory, include the memory_id and target parameters.

To add a Segment to a Document, include the document_id and the source parameters. The target parameter is optional.

memory_id: integer

A unique Memory identifier.

document_id: integer

A unique Document identifier.

source: string

The source string.

target: string

The target string.

Request Content-Types: application/json
Request Example
{
  "memory_id": 10641,
  "document_id": 1876,
  "source": "Code zur Fehleranalyse einschalten",
  "target": "Enable debugging code"
}

A Segment object.

Unexpected error

Response Example (200 OK)
{
  "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
}
Response Example (default )
{
  "message": "Internal server error."
}

Retrieve a Segment

GET /segments

Retrieve a Segment.

id: integer
in query

A unique Segment identifier.

include_comments: boolean false
in query

Include comments in the response.

A Segment object.

Unexpected error

Response Example (200 OK)
{
  "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,
  "comments": [
    {
      "id": 84480010,
      "text": "This is incorrect.",
      "annotations": [
        {
          "text": "mistranslation"
        }
      ],
      "is_resolved": true,
      "document_id": 5678,
      "segment_id": 5678,
      "segment_revision_id": 5678,
      "user_id": 5678,
      "created_at": 1489147692
    }
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Update a Segment

PUT /segments

Update a Segment in memory. The Memory will be updated with the new target string.

The Segment resource to update.

id: integer

A unique Segment identifier.

target: string

The target string.

Request Content-Types: application/json
Request Example
{
  "id": 84480010,
  "target": "Enable debug code"
}

A Segment object.

Unexpected error

Response Example (200 OK)
{
  "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
}
Response Example (default )
{
  "message": "Internal server error."
}

Delete a Segment

DELETE /segments

Delete a Segment from memory. This will not delete a segment from a document.

id: integer
in query

A unique Segment identifier.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "id": 46530,
  "deleted": true
}
Response Example (default )
{
  "message": "Internal server error."
}

Unaccept and unlock segments

POST /segments/review/unlock

Unaccept and unlock segments. Sets individual segments' "Review Done" to false. Confirmed segments will remain confirmed.

Example curl:

  curl --X --request POST 'https://lilt.com/2/segments/review/unlock?key=API_KEY' \
  --header 'Content-Type: application/json' \
  --data-raw '{
      "segmentIds": [23921, 23922]
  }'

segment ids to update

documentIds: number[]

array of segment ids

Request Example
{
  "documentIds": [
    30032,
    30125
  ]
}
200 OK

array of updated segments

type
array
Response Example (200 OK)
"array"

Tag a Segment

GET /segments/tag

Project tags for a segment. The source_tagged string contains one or more SGML tags. The target string is untagged. This endpoint will automatically place the source tags in the target.

Usage charges apply to this endpoint for production REST API keys.

source_tagged: string
in query

The tagged source string.

target: string
in query

The target string.

memory_id: integer
in query

A unique Memory identifier.

A TaggedSegment object.

Unexpected error

Response Example (200 OK)
{
  "source_tagged": "The <b>red bus.</b>",
  "target_tagged": "Le <b>bus rouge.</b>"
}
Response Example (default )
{
  "message": "Internal server error."
}

Settings

Get organization-level settings

POST /settings

Create or update the value for the given setting and setting scope.

Example CURL to set an organization-level setting:

curl --location --request POST 'https://lilt.com/2/settings?key=<API_KEY>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "settingName": "requireBatchQaTranslator",
    "value": false,
    "organizationId": 285,
    "scope": "Organization"
}'

Body to create or update a setting.

Body to create or update a setting.

settingName: string

The name of the setting.

scope: string

The entity scope the setting should be applied to.

value: string | integer | object | boolean

The active value of the setting.

isEnforced: boolean

Whether this value should override others set for the same setting key.

projectId: number

Id of the the project the setting will be applied to. Required when scope is Project.

organizationId: number

Id of the the project the setting will be applied to. Required when scope is Organization.

Request Example
{
  "settingName": "requireBatchQaTranslator",
  "scope": "Organization",
  "value": "string | integer | object | boolean",
  "isEnforced": "boolean",
  "projectId": "number",
  "organizationId": 123
}

Updated settings object and updated active settings.

Unexpected error

Response Example (200 OK)
{
  "scopedSetting": {
    "id": "integer (int32)",
    "name": "string",
    "valueType": "string",
    "value": "string | integer | object | boolean",
    "defaultValue": "string | integer | object | boolean",
    "isUserFacing": "boolean",
    "isDefault": "boolean"
  },
  "activeSettings": "object"
}
Response Example (default )
{
  "message": "Internal server error."
}

Update or create a setting

GET /settings/organization

Get the organization-level settings for the active users organization

Example CURL:

curl --location --request GET 'https://lilt.com/2/settings/organization?key=<API_KEY>' \

Organization settings dictionary.

Unexpected error

Response Example (200 OK)
Response Example (default )
{
  "message": "Internal server error."
}

Get settings for a project

GET /settings/project/{projectId}

Get the settings as applied to a specific project. Active settings will combine project-level settings, organization-level settings and fallback to setting default values.

Example CURL:

curl --location --request GET 'https://lilt.com/2/settings/project/123?key=<API_KEY>' \
projectId: integer
in path

A project id.

Project settings dictionary.

Unexpected error

Response Example (200 OK)
Response Example (default )
{
  "message": "Internal server error."
}

Get settings for a project

GET /settings/user

Get the active settings applied to a user.

Example CURL:

curl --location --request GET 'https://lilt.com/2/settings/user?key=<API_KEY>' \

Project settings dictionary.

Unexpected error

Response Example (200 OK)
Response Example (default )
{
  "message": "Internal server error."
}

Translate

Translate a segment

GET /translate

Translate a source string.

Setting the rich parameter to true will change the response format to include additional information about each translation including a model score, word alignments, and formatting information. The rich format can be seen in the example response on this page.

By default, this endpoint also returns translation memory (TM) fuzzy matches, along with associated scores. Fuzzy matches always appear ahead of machine translation output in the response.

The maximum source length is 5,000 characters.

Usage charges apply to this endpoint for production REST API keys.

memory_id: integer
in query

A unique Memory identifier.

source: string
in query

The source text to be translated.

source_hash: integer
in query

A source hash code.

prefix: string
in query

A target prefix.

n: integer 1
in query

Return top n translations (deprecated).

rich: boolean false
in query

Returns rich translation information (e.g., with word alignments).

tm_matches: boolean true
in query

Include translation memory fuzzy matches.

project_tags: boolean false
in query

Project tags. Projects tags in source to target if set to true.

A TranslationList object.

Unexpected error

Response Example (200 OK)
{
  "untokenizedSource": "Authentication not required.",
  "tokenizedSource": "Authentication not required .",
  "sourceDelimiters": [
    "",
    " ",
    " ",
    "",
    ""
  ],
  "translation": [
    [
      {
        "score": 3.4936864e-8,
        "align": "0-0 1-1 2-2 3-3",
        "targetDelimiters": [
          "",
          " ",
          " ",
          "",
          ""
        ],
        "targetWords": [
          "Authentifizierung",
          "nicht",
          "erforderlich",
          "."
        ],
        "target": "Authentifizierung nicht erforderlich .",
        "targetWithTags": "Authentifizierung nicht erforderlich.",
        "isTMMatch": false,
        "provenance": "0 0 0 0"
      }
    ]
  ]
}
Response Example (default )
{
  "message": "Internal server error."
}

Register a segment

GET /translate/register

Register a source string for interactive translation. The source_hash value that is returned by this request is required by the prefix parameter for the translation endpoint. The maximum source length is 5,000 characters. Usage charges apply to this endpoint for production REST API keys.

source: string
in query

A source string to be registered.

srclang: string
in query

An ISO 639-1 language code.

trglang: string
in query

An ISO 639-1 language code.

200 OK

A status object.

type
object

Unexpected error

Response Example (200 OK)
{
  "source_hash": 11476,
  "num_words": 88
}
Response Example (default )
{
  "message": "Internal server error."
}

Translate a File

POST /translate/file

Start machine translation of one or more Files that have previously been uploaded. The response will include an id parameter that can be used to monitor and download the translations in subsequent calls.

Example CURL:

curl --X --request POST 'https://lilt.com/2/translate/file?key=API_KEY&fileId=583&memoryId=2495&configId=123&withTM=true'
fileId: string
in query

List of File ids to be translated, comma separated.

memoryId: string
in query

Id of Memory to use in translation.

configId: number
in query

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

withTM: boolean
in query

An optional boolean parameter to toggle the use of Translation Memory in the translation of the file.

Translation info

Unexpected error

Response Example (200 OK)
{
  "id": 1,
  "fileId": "2,",
  "status": "InProgress",
  "createdAt": 1609357135
}
Response Example (default )
{
  "message": "Internal server error."
}

Monitor file translation

GET /translate/file

Get information about the one or more Files that are being translated with machine translation. Query filters are optional but at least one must be provided.

Example CURL:

curl --X --request GET 'https://lilt.com/2/translate/file?key=API_KEY&translationIds=1,2&fromTime=1607966744&toTime=1707966744&status=InProgress'
translationIds: string
in query

List of translation ids, comma separated

status: string
in query

One of the translation statuses - InProgress, Completed, Failed, ReadyForDownload

fromTime: number
in query

Results after this time (inclusive) will be returned, specified as seconds since the Unix epoch.

toTime: number
in query

Results before this time (exclusive) will be returned, specified as seconds since the Unix epoch.

Translation info

Unexpected error

Response Example (200 OK)
{
  "id": 1,
  "fileId": "2,",
  "status": "InProgress",
  "createdAt": 1609357135
}
Response Example (default )
{
  "message": "Internal server error."
}

Download translated file

GET /translate/files

Download a translated File.

Example CURL:

curl --X --request GET 'https://lilt.com/2/translate/files?key=API_KEY&id=1'
id: string
in query

A translation id.

200 OK

A file.

type
string (byte)
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"

Schema Definitions

definitions/Error.yaml#/Error: object

Response in the event of an unexpected error.

message: object

A human-readable message describing the error.

Example
{
  "message": "Internal server error."
}

definitions/Error.yaml:

Example