Update Specific Translation
const url = 'https://app.lionrapid.com/api/integrations/sync/example';const options = { method: 'PUT', headers: {'Content-Type': 'application/json'}, body: '"Welcome to our app!"'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url https://app.lionrapid.com/api/integrations/sync/example \ --header 'Content-Type: application/json' \ --data '"Welcome to our app!"'Update a specific translation key.
This endpoint updates a single translation key identified by the encoded key format used throughout the integrations API.
Args: encoded_key: URL-encoded translation key (e.g., “en%3Aapp%3Auser.profile.name”) update_request: Translation value to set api_key: Integration API key for authentication
Returns: Sync operation status and statistics
Raises: authentication_error: Invalid API key (401) validation_error: Invalid key format or data (400) internal_error: Server error (500)
Example: PUT /sync/en%3Aapp%3Awelcome { “value”: { “text”: “Welcome to <1>our amazing app</1>!”, “styles”: {“1”: [“bold”]} } }
→ Updates: "app.welcome" with styled content
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Query Parameters
Section titled “Query Parameters”Header Parameters
Section titled “Header Parameters”Request Bodyrequired
Section titled “Request Bodyrequired”Request for updating a single translation key.
Accepts multiple input formats:
- Plain string: “Welcome” -> auto-wrapped to ContentUnit
- HTML string: “Click here” -> parsed to ContentUnit
- ContentUnit dict: {“text”: “…”, “styles”: {…}} -> used directly
object
ContentUnit format for styled translations.
Uses indexed tags format where styles are referenced by numeric indices. Example: {“text”: “Click <1>here</1>”, “styles”: {“1”: [“hyperlink:/home”]}}
object
Text with indexed tags like ‘Click <1>here</1>’
Style definitions by tag index, e.g., {‘1’: [‘bold’, ‘hyperlink:/path’]}
object
Responses
Section titled “Responses”Successful Response
Response for translation sync operations.
object
Sync status
Synced language
Target namespace
Number of new translation keys added
Number of existing translation keys updated
Total number of keys processed
Example
{ "keys_added": 5, "keys_updated": 3, "language": "eng", "namespace": "app", "status": "synced", "total_processed": 8}Validation Error
object
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example" } ]}