Translations endpoints
Fetch live translations directly from the database.
Overview
These endpoints return translations stored in the PostgreSQL database. They are the most up-to-date source but go through the database on every request. For high-traffic production use, consider the cached endpoints instead.
GET /v1/translations/
Returns all approved translations for the given language. Each translation key is keyed by its full name (e.g. common.welcome).
Request
GET https://sapi.i18nme.com/v1/translations/{language}| Parameter | In | Required | Description |
|---|---|---|---|
language | path | ✅ | Language code (e.g. en, pl, de) |
status | query | ❌ | Filter by translation status: approved (default), draft, review, or all |
| Header | Required | Description |
|---|---|---|
X-API-Key | ✅ | Your project API key |
Response
200 OK — default (?status=approved)
{
"project_id": "3fa85f64-...",
"language": "en",
"status_filter": "approved",
"count": 3,
"translations": {
"common.welcome": "Welcome",
"common.logout": "Log out",
"nav.home": "Home"
}
}200 OK — with ?status=all (includes every status)
{
"project_id": "3fa85f64-...",
"language": "en",
"status_filter": "all",
"count": 4,
"translations": {
"common.welcome": { "value": "Welcome", "status": "approved", "group": "common" },
"common.logout": { "value": "Log out", "status": "approved", "group": "common" },
"nav.home": { "value": "Home", "status": "draft", "group": "nav" },
"nav.pricing": { "value": "Pricing", "status": "review", "group": "nav" }
}
}When ?status=all is used, each value is an object with value, status, and group. For any other status filter, each value is a plain string.
404 Not Found — language has no translations at all in this project.
GET /v1/translations/{language}/
Returns only translations belonging to the specified group for the given language.
Request
GET https://sapi.i18nme.com/v1/translations/{language}/{group}| Parameter | In | Required | Description |
|---|---|---|---|
language | path | ✅ | Language code |
group | path | ✅ | Group name |
status | query | ❌ | approved (default), draft, review, or all |
Response
200 OK — default (?status=approved)
{
"project_id": "3fa85f64-...",
"language": "en",
"group": "common",
"status_filter": "approved",
"count": 2,
"translations": {
"common.welcome": "Welcome",
"common.logout": "Log out"
}
}200 OK — with ?status=all
{
"project_id": "3fa85f64-...",
"language": "en",
"group": "common",
"status_filter": "all",
"count": 2,
"translations": {
"common.welcome": { "value": "Welcome", "status": "approved" },
"common.logout": { "value": "Log out", "status": "draft" }
}
}404 Not Found — no translations found for this group / language combination.
GET /v1/translations/{language}/{group}/
Returns a single translation value identified by group name and key name.
Request
GET https://sapi.i18nme.com/v1/translations/{language}/{group}/{key}| Parameter | In | Required | Description |
|---|---|---|---|
language | path | ✅ | Language code |
group | path | ✅ | Group name |
key | path | ✅ | Full key name (including group prefix, e.g. common.welcome) |
status | query | ❌ | approved (default), draft, review, or all |
Response
200 OK
{
"key": "common.welcome",
"group": "common",
"language": "en",
"value": "Welcome",
"status": "approved"
}404 Not Found — language, group, or key does not exist, or the translation does not match the requested status filter
{ "detail": "Translation key 'common.welcome' in group 'common' not found for language 'en'" }Examples (all three variants)
# All translations for Polish
curl https://sapi.i18nme.com/v1/translations/pl \
-H "X-API-Key: key_live_XXXX"
# Only the 'nav' group
curl https://sapi.i18nme.com/v1/translations/pl/nav \
-H "X-API-Key: key_live_XXXX"
# Single key
curl https://sapi.i18nme.com/v1/translations/pl/nav/home \
-H "X-API-Key: key_live_XXXX"const BASE = 'https://sapi.i18nme.com'
const HEADERS = { 'X-API-Key': process.env.I18N_API_KEY }
// All translations
const all = await fetch(`${BASE}/v1/translations/pl`, { headers: HEADERS }).then(r => r.json())
// Single group
const nav = await fetch(`${BASE}/v1/translations/pl/nav`, { headers: HEADERS }).then(r => r.json())
// Single key
const home = await fetch(`${BASE}/v1/translations/pl/nav/home`, { headers: HEADERS }).then(r => r.json())
console.log(home.value) // "Strona główna"import httpx, os
BASE = 'https://sapi.i18nme.com'
HEADERS = {'X-API-Key': os.environ['I18N_API_KEY']}
all_tr = httpx.get(f'{BASE}/v1/translations/pl', headers=HEADERS).json()
nav_tr = httpx.get(f'{BASE}/v1/translations/pl/nav', headers=HEADERS).json()
home_tr = httpx.get(f'{BASE}/v1/translations/pl/nav/home', headers=HEADERS).json()
print(home_tr['value'])