Cache endpoints
Trigger and inspect the translation cache rebuild.
Overview
The cache layer exports all approved translations from the database to static JSON files stored in Cloudflare R2. These files are served by the cached translation endpoints.
After making changes to keys or translations via the API, trigger a rebuild so that the cached endpoints reflect the latest data.
POST /v1/cache/rebuild
Enqueue an asynchronous cache rebuild for the project.
The rebuild runs in the background and exports all approved translations to the configured S3/R2 bucket. The request returns immediately with 202 Accepted. Poll GET /v1/cache/status to check when it completes.
Request
POST https://sapi.i18nme.com/v1/cache/rebuild| Header | Required | Description |
|---|---|---|
X-API-Key | ✅ | Your project API key |
Response
202 Accepted
{
"project_id": "3fa85f64-...",
"status": "queued",
"message": "Cache rebuild has been queued. Check /v1/cache/status for completion."
}GET /v1/cache/status
Return the timestamp of the last successful cache rebuild.
Request
GET https://sapi.i18nme.com/v1/cache/status| Header | Required | Description |
|---|---|---|
X-API-Key | ✅ | Your project API key |
Response
200 OK — rebuild has completed at least once
{
"project_id": "3fa85f64-...",
"last_rebuilt_at": "2026-06-04T12:34:56.789Z",
"ready": true
}200 OK — no rebuild has completed yet
{
"project_id": "3fa85f64-...",
"last_rebuilt_at": null,
"ready": false
}When ready is false, the cached endpoints will return 503 Service Unavailable.
Typical workflow
After pushing translation changes via the API:
- Create or update keys with
POST /v1/keysandPUT /v1/keys/{id}/translations/{lang} - Trigger
POST /v1/cache/rebuild - Poll
GET /v1/cache/statusuntilreadyistrue - Fetch translations via the cached endpoints
Examples
curl -X POST https://sapi.i18nme.com/v1/cache/rebuild \
-H "X-API-Key: key_live_XXXX"curl https://sapi.i18nme.com/v1/cache/status \
-H "X-API-Key: key_live_XXXX"until [ "$(curl -s https://sapi.i18nme.com/v1/cache/status \
-H "X-API-Key: key_live_XXXX" | jq -r .ready)" = "true" ]; do
sleep 3
done
echo "Cache is ready"