Skip to content

Update Specific Translation

PUT
/api/integrations/sync/{encoded_key}
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
encoded_key
required
Encoded Key
string
surface
Any of:
string
x-api-key
Any of:
string
x-lr-surface
Any of:
string
Media typeapplication/json
TranslationKeyUpdateRequest

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
value
required
Any of:
string

Successful Response

Media typeapplication/json
TranslationSyncResponse

Response for translation sync operations.

object
status
required
Status

Sync status

string
language
required
Language

Synced language

string
namespace
required
Namespace

Target namespace

string
keys_added
required
Keys Added

Number of new translation keys added

integer
keys_updated
required
Keys Updated

Number of existing translation keys updated

integer
total_processed
required
Total Processed

Total number of keys processed

integer
Example
{
"keys_added": 5,
"keys_updated": 3,
"language": "eng",
"namespace": "app",
"status": "synced",
"total_processed": 8
}

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"
}
]
}