Add or update a translation of a document
Adds a target language to the document, or changes the translators of a language it already has. The translators of the body replace the current ones: a translator left out is removed from the language, and an empty list assigns the language to you. Sending the same body again changes nothing.
An address of a member of the team (a manager, you included, or a translator) is assigned as it is. Any other address is invited to the team as a translator, within the translator seats of the plan, and receives the invitation by email. A translator invited by a call that fails later stays invited. Each translator who is not you gets a translation job by email, like an assignment from the app.
The document can be UPLOADED or INDEXED. A new language of an indexed document can be translated at once. The translators of a translation can change whatever its status.
apiKeyAuthorizationBearer <token>The key the team leader created in Redokun, sent as Authorization: Bearer rdk_.... A read key is rejected on every call that writes (any method other than GET, HEAD or OPTIONS).
id*integerIdentifier of the document
1 <= value <= 2147483647code*stringBCP 47 tag of the target language, as GET /v1/languages lists it, e.g. it or pt-BR. Not case sensitive
^[a-zA-Z]{2,3}(-[a-zA-Z0-9]{1,8})*$application/json- body
The translators of the language. An unknown property is refused
translators*array<>Email addresses of every translator of the language: the list replaces the current one, and a translator left out is removed from the language. An address of a member of the team (a manager, you included, or a translator) is assigned as it is; any other address is invited to the team as a translator. An empty list assigns the language to you
items <= 10The document already had the language: the translation, with its new translators
application/json- response
id*integerIdentifier of the translation. Each revision of the document has its own translations, so the id changes when a new revision is uploaded
language*Language of the translation
status*stringCREATED: the translation is open for work. PRE_TRANSLATING: a pre-translation that includes this language is queued or running. CONFIRMED: the translation was confirmed and the file can be generated. GENERATING: the translated file is being generated. GENERATED: the translated file is ready.
"CREATED""PRE_TRANSLATING""CONFIRMED""GENERATING""GENERATED"progress*translators*array<>The people assigned to translate this language
createdAt*stringWhen the language was added to the document
date-timeupdatedAt*|When the translation last changed. Null if it never did
date-timelinks*array<>The resources related to this one. Follow these links instead of building the URLs yourself, so a change of path does not break the client
curl -X PUT 'https://api.redokun.com/v1/documents/1/translations/string' \ -H 'Content-Type: application/json' \ -d '{ "translators": [ "mario.rossi@acme.com" ]}'{ "id": 0, "language": { "name": "string", "code": "string" }, "status": "CREATED", "progress": { "totalSegments": 0, "translatedSegments": 0, "confirmedSegments": 0, "draftSegments": 0, "completedPercentage": 0.1 }, "translators": [ { "id": 0, "fullName": "string", "email": "string", "inviteStatus": "INVITED" } ], "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "links": [ { "rel": "string", "href": "string" } ]}Get the current account GET
The account the API key acts as
Download a translation of a document GET
A URL to download the translated file of one language of the document. The translation must be `GENERATED`: check its status with `GET /v1/documents/{id}/translations/{code}`. The file is stored a few seconds after the translation becomes `GENERATED`, and until then the call answers 409. The answer does not hold the file. Download it with a GET to `url`, with no `Authorization` header, before `expiresAt`: the URL works for 15 minutes. Ask for a new URL after that. Anyone who holds the URL can download the file, so do not share or log it. An id that belongs to an older revision of the document answers 303 and points to the download of the same language in the latest revision. Following the redirect is a second call, and counts against the rate limit like any other.