Content API
Fetch localized key-value content strings. Useful for UI labels, headings, and other translatable text.
GET/api/public/content
Returns content strings for a locale. Optionally filter by key.
Query Parameters
localestringLocale to fetch. Defaults to the workspace's default locale.
keystringFetch a specific key.
keysstringComma-separated list of keys to fetch.
200All keys
json
{
"locale": "fr",
"content": {
"hero.title": "Bienvenue",
"hero.subtitle": "Sur notre site"
},
"count": 2
}{
"locale": "fr",
"content": {
"hero.title": "Bienvenue",
"hero.subtitle": "Sur notre site"
},
"count": 2
}200Single key
json
{
"key": "hero.title",
"value": "Bienvenue",
"locale": "fr"
}{
"key": "hero.title",
"value": "Bienvenue",
"locale": "fr"
}POST/api/public/content/preview
Fetch content with overrides applied. Useful for preview scenarios where you want to test content changes before publishing.
Request Body
localestringrequiredLocale to fetch (2-10 characters).
overridesRecord<string, string>requiredKey-value pairs to override in the response.
Request
{
"locale": "fr",
"overrides": {
"hero.title": "Preview Title",
"hero.subtitle": "Preview Subtitle"
}
}{
"locale": "fr",
"overrides": {
"hero.title": "Preview Title",
"hero.subtitle": "Preview Subtitle"
}
}200Success
json
{
"locale": "fr",
"content": {
"hero.title": "Preview Title",
"hero.subtitle": "Preview Subtitle",
"footer.copyright": "© 2025"
},
"count": 3,
"previewMode": true,
"overridesApplied": 2
}{
"locale": "fr",
"content": {
"hero.title": "Preview Title",
"hero.subtitle": "Preview Subtitle",
"footer.copyright": "© 2025"
},
"count": 3,
"previewMode": true,
"overridesApplied": 2
}