Skip to content

Sync Namespace Translations

POST
/api/integrations/sync/{locale}/{namespace}
curl --request POST \
--url https://example.com/api/integrations/sync/example/example \
--header 'Content-Type: application/json' \
--data '{ "auto_translate": false, "translations": { "settings": { "language": "English", "theme": "Dark" }, "user": { "profile": { "email": "Email Address", "name": "Name" } }, "welcome": "Welcome to our app!" } }'

Queue translation sync job for async processing.

This endpoint accepts nested JSON structure, validates it, and queues a sync job. The job is processed asynchronously to prevent database lock contention.

Args: locale: Target language locale (e.g., “en”, “fr”, “de”) namespace: Target namespace (e.g., “app”, “common”, “admin”) sync_request: Nested translation data api_key: Integration API key for authentication

Returns: 202 Accepted with job_id for status polling

Raises: authentication_error: Invalid API key (401) validation_error: Invalid data structure (400)

Example: POST /sync/en/app { “translations”: { “user”: { “profile”: {“name”: “Name”, “email”: “Email”} }, “welcome”: “Welcome!” }, “auto_translate”: true }

→ Returns: {"job_id": "...", "status": "pending", "message": "..."}
→ Poll: GET /sync/jobs/{job_id}
locale
required
Locale
string
namespace
required
Namespace
string
x-api-key
Any of:
string
Media typeapplication/json
TranslationSyncRequest

Request for syncing nested translations to a specific namespace.

object
translations
required
Translations

Nested translation structure for the target namespace

object
key
additional properties
any
auto_translate
Auto Translate

Automatically translate source content to all configured target languages

boolean

Successful Response

Media typeapplication/json
SyncJobResponse

Response model for sync job creation.

object
job_id
required
Job Id
string
status
required
JobStatus

Status of a sync job.

string
Allowed values: pending processing completed failed
message
required
Message
string
Example
{
"job_id": "550e8400-e29b-41d4-a716-446655440000",
"message": "Sync job queued successfully. Poll /sync/jobs/{job_id} for status.",
"status": "pending"
}

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
Examplegenerated
{
"detail": [
{
"loc": [
"example"
],
"msg": "example",
"type": "example"
}
]
}