Upload a document

📘

Supported formats

See "Supported formats" section to get a list of supported formats for documents, style guides and glossaries.

❗️

You can only add/update/delete documents before you launch the project.

Uploading documents as form data

You can also upload your documents by providing their content directly in the POST request. Instead of providing an array of file handles in documents parameter, just enter name and data parameters for each document file.

Example:

----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="documents[0][name]"

Test.html
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="documents[0][data]"

<html><head></head><body><p>This is my HTML document.</p></body></html>
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="documents[1][name]"

Test.xlsx
----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="documents[1][data]"

[BINARY DATA...]
----WebKitFormBoundary7MA4YWxkTrZu0gW
var form = new FormData();
form.append("source_language", "af");
form.append("target_languages[]", "sq");
form.append("documents[0][name]", "Test.html");
form.append("documents[0][data]", "<html><head></head><body><p>This is my HTML document.</p></body></html>");
form.append("documents[1][name]", "Test.xlsx");
form.append("documents[1][data]", "[BINARY DATA...]");

👍

You can also upload style guide and glossary files in this scheme.

Language
Authorization
Query
Click Try It! to start a request and see the response here!