Skip to content

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
HeaderRequiredDescription
X-API-KeyYour project API key

Response

202 Accepted

json
{
  "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
HeaderRequiredDescription
X-API-KeyYour project API key

Response

200 OK — rebuild has completed at least once

json
{
  "project_id": "3fa85f64-...",
  "last_rebuilt_at": "2026-06-04T12:34:56.789Z",
  "ready": true
}

200 OK — no rebuild has completed yet

json
{
  "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:

  1. Create or update keys with POST /v1/keys and PUT /v1/keys/{id}/translations/{lang}
  2. Trigger POST /v1/cache/rebuild
  3. Poll GET /v1/cache/status until ready is true
  4. Fetch translations via the cached endpoints

Examples

bash
curl -X POST https://sapi.i18nme.com/v1/cache/rebuild \
  -H "X-API-Key: key_live_XXXX"
bash
curl https://sapi.i18nme.com/v1/cache/status \
  -H "X-API-Key: key_live_XXXX"
bash
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"

i18nme is provided on a best-effort basis. While we strive for reliability and rapid issue resolution, no specific uptime, response time, or bug-fix timeframe is guaranteed.
Translation content and AI-generated output should be reviewed before production use.