Skip to main content

Start a translation of a document.

POST/api/v1/documents/{document_id}/translationsdocuments:write

Starts a translation of the document into the language (free text) as the Portal does: the answer is the translation row, PENDING, and it is made in the background by a model (it bills an LLM run). Poll get_document_translation until COMPLETED. Needs Translate Documents and access to the document.

Scopedocuments:write
AsynchronousNo
MCP toolcreate_document_translation
Portal permissionstranslate_documents

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonDocumentTranslationCreateInput

Responses​

StatusDescriptionBody
201Success.application/json DocumentTranslation or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentTranslation​

FieldTypeRequiredDescription
created_atstring (date-time) or nullRequired
document_translation_idstringRequired
languagestringRequiredThe target language, as it was asked for.
statusstring or nullRequiredPENDING while it is being made, COMPLETED when it can be burned into a document, FAILED when it could not be made. Open.
translationobject or nullRequiredThe translated text segments with their page and position, format document_translation; null until it is completed.

DocumentTranslationCreateInput​

FieldTypeRequiredDescription
languagestringRequiredThe language to translate into, as free text (English, ja, Français). Not blank.