Skip to content

Get Namespace Translations

GET
/api/integrations/translations/{locale}/{namespace}
curl --request GET \
--url 'https://app.lionrapid.com/api/integrations/translations/example/example?format=content_unit&include_drafts=false'

Get all translations for a specific namespace.

Returns a FLAT map of dotted keys → ContentUnit (the same shape the sync write accepts) plus an ICU parameter schema. No nesting: a key like “user.profile.name” stays a single flat key.

Args: locale: Target language locale (e.g., “en”, “fr”, “de”) namespace: Translation namespace (e.g., “app”, “common”, “admin”) api_key: Integration API key for authentication format: Response format - content_unit (default), html, or text

Returns: Complete namespace translations with metadata and schema

HTTP Status: - 200: At least one ready translation found - 404: Namespace doesn’t exist - 422: Invalid format parameter - 423: Namespace exists but zero translations ready

Raises: authentication_error: Invalid API key (401) validation_error: Invalid parameters (400) namespace_locked: Namespace exists but no translations ready (423) not_found: Namespace doesn’t exist (404) internal_error: Server error (500)

locale
required
Locale
string
namespace
required
Namespace
string
format
ResponseFormat

Response format for translation retrieval.

Controls how translation values are formatted in GET responses:

  • content_unit: Default indexed tags format (SDK-compatible)
  • html: HTML strings with semantic elements
  • text: Plain text without any formatting
string
default: content_unit
Allowed values: content_unit html text
include_drafts
Include Drafts
boolean
surface
Any of:
string
if-none-match
Any of:
string
x-api-key
Any of:
string
x-lr-surface
Any of:
string

Successful Response

Media typeapplication/json
TranslationResponse

Standard response for all translation requests (namespace and individual).

translations is a FLAT map of dotted keys → ContentUnit — the same shape the write (sync) accepts. There is no nesting and no bare strings: every value is {"text": ..., "styles": {...}} with styles always present (empty when the string has no inline styling). A key with dots (“user.profile.name”) stays a single flat key; clients must NOT re-nest it.

(html / text formats replace each ContentUnit leaf with a string but keep the same flat keys.)

Example ContentUnit with styles: {“text”: “Click <1>here</1>”, “styles”: {“1”: [“hyperlink:/home”]}}

object
meta
required
TranslationMetaResponse

Response metadata

object
version
required
Version

API version

string
locale
required
Locale

Target locale

string
namespace
required
Namespace

Translation namespace

string
key
Any of:
string
source_context
Any of:
string
generated_at
required
Generated At

ISO timestamp of response generation

string
project_uuid
Any of:
string
etag
Any of:
string
is_source_locale
Any of:
boolean
schema
required
Schema

ICU parameter schema mapping (flat) keys to parameter lists

object
key
additional properties
Array<string>
translations
required
Translations

Flat map of dotted keys → ContentUnit (content_unit format) or string (html/text formats). No nesting.

object
Example
{
"meta": {
"generated_at": "2025-10-02T12:00:00Z",
"locale": "en",
"namespace": "app",
"source_context": "eng",
"version": "1.0.0"
},
"schema": {
"item": [
"count"
],
"user.profile.name": [],
"welcome": []
},
"translations": {
"item": {
"styles": {},
"text": "{count, plural, =0 {no items} one {# item} other {# items}}"
},
"link": {
"styles": {
"1": [
"hyperlink:/home"
]
},
"text": "Click <1>here</1>"
},
"user.profile.email": {
"styles": {},
"text": "Email Address"
},
"user.profile.name": {
"styles": {},
"text": "Name"
},
"welcome": {
"styles": {},
"text": "Welcome to our app!"
}
}
}

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