Manual
CLI
API
Log in Get started free

Save a translation

Writes the translation of a key in one language, as a draft or submitted for review.

Writes the translation of a key in one language, as a draft or submitted for review.

HTTP
PUT /keys/{keyId}/translations/{language}

Access: Session token, or an API key with the translations:write scope.

Role: Any role in the project.

Path parameters #

ParameterDescription
keyIdThe id of the key.
languageThe language code, such as de-de.

Request body #

JSON.

FieldTypeRequiredDescription
valuestringyesThe translation. Trimmed. May be empty for a draft.
submitbooleannofalse (default) saves a draft. true submits it: it goes to review, or is approved straight away when the project does not require review.
machineTranslatedbooleannotrue when the value is an unchanged suggestion. The translation is then flagged as machine translated, unless the project switched the flag off. Any save without it removes the flag.
JSON
{ "value": "Kasse", "submit": true }

Response 200 #

The translation as saved.

JSON
{ "value": "Kasse", "status": "review", "machineTranslated": false }

Response fields #

FieldTypeDescription
valuestringThe translation.
statusstringdraft, review or approved after saving, changes after requesting changes.
machineTranslatedbooleanWhether the translation is flagged as machine translated.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
404not_foundThe key does not exist, you have no access to its project, or keyId is not a UUID.
409branch_frozenThe branch is frozen. The same call also fails with project_frozen when the project is frozen.
404not_foundThe language is not a language of the project, or it is inactive.
422invalid_requestvalue is not a string, submit is not a boolean, submit is true with an empty value (value: empty), the key has no source text (source: missing), or the value is longer than the key’s maxLength (value: too_long).
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.

Notes #

Triggers the translation.created webhook when the key had no translation in the language, and translation.approved when the result is approved. Submitting notifies reviewers when the project asks for it.