Skip to content

API & CLI

All programmatic access to Ownlate uses API keys. Go to Workspace → API Keys to create one.

Each key has:

  • Name — a label to identify the key (e.g. ci-pipeline)
  • Scopes — granular permissions (same set as workspace member permissions)
  • Expiration — optional expiry date; the key stops working after this date

To revoke a key, go to Workspace → API Keys and click Revoke.

The Ownlate API is a standard REST API. Pass your API key in the Authorization header:

Authorization: Bearer <your-api-key>

The full list of available endpoints is in the interactive API reference:

API Reference (Swagger)

Projects marked as public expose read-only endpoints without authentication. These are useful for open-source projects that want to let the community see translation progress.

GET /public/projects/:projectId/translations-map?lang=ru

Returns a flat key → value map of approved translations for the given language.

The @ownlate/cli tool is designed for CI/CD pipelines. Install it with:

Terminal window
npm install -g @ownlate/cli
# or
pnpm add -g @ownlate/cli
Terminal window
ownlate login --api-key <your-api-key>

Or set the environment variable:

Terminal window
export OWNLATE_API_KEY=<your-api-key>
Terminal window
ownlate push --project <project-id> --file ./locales/en.json --lang en

Use this in your CI pipeline after merging new strings to keep Ownlate in sync with your source code.

Terminal window
ownlate pull --project <project-id> --lang ru --output ./locales/ru.json

Pull all languages at once:

Terminal window
ownlate pull --project <project-id> --output ./locales/

This creates one file per language in the output directory.

.github/workflows/translations.yml
- name: Push source strings to Ownlate
run: ownlate push --project $PROJECT_ID --file locales/en.json --lang en
env:
OWNLATE_API_KEY: ${{ secrets.OWNLATE_API_KEY }}
- name: Pull approved translations
run: ownlate pull --project $PROJECT_ID --output locales/
env:
OWNLATE_API_KEY: ${{ secrets.OWNLATE_API_KEY }}