Start bulk background translation of a schema's published documents into target languages.
Kick off bulk background translation of all published documents of a schema into a set of target languages. Results are upserted into the translations table as each inference completes.
Auth: Bearer JWT (WorkOS).
{
"websiteId": "<uuid>",
"schemaName": "post",
"languages": ["fr", "es", "de"]
}
| Field | Type | Required | Notes |
|---|---|---|---|
websiteId | uuid | yes | Target website. |
schemaName | string | yes | Schema whose published documents to translate. |
languages | string[] | yes | Target language codes (2-letter). Must be among the 35 supported codes. |
{
"schema_name": "post",
"documents_processed": 12,
"translations_scheduled": 30,
"translations_skipped": 6
}
Returns 202 Accepted when work was scheduled (translation runs in the background), or 200 OK when everything was already up to date (translations_scheduled: 0).
Each (document, language) pair is skipped when the SHA-256 of the document's published content matches the stored source hash. Only published documents with non-null content are translated. Concurrency is capped and each item retries with backoff on transient failures.
curl -X POST '{CMS_API_URL}/translation' \
-H 'Authorization: Bearer <workos-jwt>' \
-H 'Content-Type: application/json' \
-d '{"websiteId":"<uuid>","schemaName":"post","languages":["fr","es"]}'
400 β languages is empty or contains an unsupported code401 β missing or invalid JWT