post-translation
Machine-translate every published document of one or more components
Queues an LLM translation job for every published document in the selected components, into each requested language. Each translation stores a SHA-256 hash of the source content, so documents that haven't changed since their last translation are skipped.
The job runs in the background. Poll GET /translation-jobs/{job_id} for progress. A request with the same selection as a job that is still running returns that job ("reused": true).
Authentication
Authorization: Bearer <workos_access_token> for a user with the editor or admin role.
Request body
| Field | Type | Required | Description |
|---|---|---|---|
websiteId | UUID | Yes | Website containing the documents |
schemaNames | string[] | Yes* | Components to translate |
schemaName | string | Yes* | Legacy single-component alternative |
languages | string[] | Yes | ISO 639-1 codes, e.g. ["fr", "es"]. Must not be empty |
* Send schemaNames or schemaName.
Response 202 Accepted
200 OK when every translation is already current.
{
"job_id": "00000000-0000-0000-0000-000000000001",
"website_id": "00000000-0000-0000-0000-000000000000",
"schema_name": null,
"schema_names": ["blog_posts", "hero"],
"languages": ["fr", "es"],
"status": "queued",
"documents_processed": 12,
"translations_scheduled": 24,
"translations_skipped": 0,
"translations_completed": 0,
"translations_failed": 0,
"error": null,
"reused": false,
"created_at": "2026-07-13T00:00:00Z",
"updated_at": "2026-07-13T00:00:00Z"
}
status is one of preparing, queued, running, completed, completed_with_errors.
Example
curl -X POST "$MEDIAN_API_URL/translation" \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"websiteId": "'$WEBSITE_ID'", "schemaNames": ["post"], "languages": ["fr", "de"]}'
Errors
| Status | Cause |
|---|---|
400 | No components or languages, an unsupported language, or the batch exceeds the limit |
401 | Missing or invalid token |
402 | Your plan's translation allowance is exhausted |
403 | Caller is not an editor or admin |
409 | Published content changed while an equivalent job is still running. Retry when it finishes |
429 | Rate limited (60 requests/min per IP) |