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

localestring

Locale to fetch. Defaults to the workspace's default locale.

keystring

Fetch a specific key.

keysstring

Comma-separated list of keys to fetch.

200All keys
json
{
  "locale": "fr",
  "content": {
    "hero.title": "Bienvenue",
    "hero.subtitle": "Sur notre site"
  },
  "count": 2
}
200Single key
json
{
  "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

localestringrequired

Locale to fetch (2-10 characters).

overridesRecord<string, string>required

Key-value pairs to override in the response.

Request
{
  "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
}