Skip to content

REST API

Every capability of the dashboard is available over HTTP. The API is defined with zod schemas that generate an OpenAPI 3.1 spec, so docs and validation can't drift.

  • Interactive docs: GET /api/docs on your instance
  • Spec: GET /api/openapi.json
  • Auth: session cookie (browser) or Authorization: Bearer olp_… (API tokens)

Endpoint map

Orgs & projects

MethodPath
GET/POST/api/v1/orgslist / create orgs
GET/POST/api/v1/orgs/:org/projectslist / create projects
GET/PATCH/api/v1/projects/:projectget / update a project
GET/POST/api/v1/projects/:project/localeslist / add locales

Keys & translations

MethodPath
GET/api/v1/projects/:project/keys?search=&namespace=&limit=&offset=keys with all translations
POST/api/v1/projects/:project/keyscreate a key
POST/api/v1/projects/:project/keys/:key/archivearchive / unarchive
PUT/api/v1/projects/:project/keys/:key/translations/:localethe audited write path
GET…/translations/:locale/versionsversion history
POST…/translations/:locale/rollbackrestore an earlier version

Import & export

MethodPath
GET/api/v1/projects/:project/export?format=&locale=&namespace=download a file
POST/api/v1/projects/:project/importmultipart upload → staged job
GET/api/v1/imports/:jobjob + staged entries
GET/POST/api/v1/imports/:job/suggestions[/:id]dedupe suggestions / resolve one
POST/api/v1/imports/:job/commitapply the import

Delivery (public)

MethodPath
GET/api/v1/cdn/:project/manifestlocale versions
GET/api/v1/cdn/:project/:locale.json?ns=&format=flat|nestedbundle (ETag/304)
GET/api/v1/cdn/:project/eventsSSE stream

Admin & misc

MethodPath
GET/api/v1/projects/:project/auditaudit events
GET/POST/DELETE/api/v1/orgs/:org/tokens[/:id]API tokens
GET/POST/DELETE/api/v1/orgs/:org/connectors[/:id]SSO connectors
POST/api/v1/sso/startbegin SSO by email domain
GET/api/v1/featuresfeature availability (ai, provider)
GET/PUT/api/v1/admin/licenselicense status / install
POST/api/v1/projects/:project/ai/translatemachine translation (licensed)

Errors

Errors are JSON with a stable machine-readable code:

json
{ "error": { "code": "FEATURE_UNLICENSED", "message": "…" } }
StatusTypical codes
401UNAUTHENTICATED, INVALID_TOKEN
402FEATURE_UNLICENSED
403FORBIDDEN
404NOT_FOUND
409SLUG_TAKEN, KEY_EXISTS, ALREADY_COMMITTED, DOMAIN_TAKEN
422VALIDATION, PARSE_ERROR, INVALID_LICENSE
429RATE_LIMITED (public delivery endpoints)
503NO_PROVIDER (AI without a server provider configured)

Worked example

sh
BASE=https://locale.example.com
TOKEN=olp_…

# create a key and give it an English value
KEY=$(curl -s -X POST $BASE/api/v1/projects/demo/keys \
  -H "Authorization: Bearer $TOKEN" -H 'content-type: application/json' \
  -d '{"name":"banner.sale","context":"Site-wide promo banner"}' | jq -r .id)

curl -s -X PUT $BASE/api/v1/projects/demo/keys/$KEY/translations/en \
  -H "Authorization: Bearer $TOKEN" -H 'content-type: application/json' \
  -d '{"value":"Summer sale — 20% off everything"}'

# it is now live:
curl -s $BASE/api/v1/cdn/demo/en.json | jq '."banner.sale"'

MIT licensed core. AI features unlock with a license key.