API & CLI
API Keys
Section titled “API Keys”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.
REST API
Section titled “REST API”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:
Public endpoints (no auth)
Section titled “Public endpoints (no auth)”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=ruReturns 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:
npm install -g @ownlate/cli# orpnpm add -g @ownlate/cliAuthentication
Section titled “Authentication”ownlate login --api-key <your-api-key>Or set the environment variable:
export OWNLATE_API_KEY=<your-api-key>Uploading source files
Section titled “Uploading source files”ownlate push --project <project-id> --file ./locales/en.json --lang enUse this in your CI pipeline after merging new strings to keep Ownlate in sync with your source code.
Downloading approved translations
Section titled “Downloading approved translations”ownlate pull --project <project-id> --lang ru --output ./locales/ru.jsonPull all languages at once:
ownlate pull --project <project-id> --output ./locales/This creates one file per language in the output directory.
CI/CD example
Section titled “CI/CD example”- 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 }}