API V2 (Beta) overview
Programmatic access to workspaces, projects, files, texts, glossaries and automation.
BetaAPI V2 is in beta. Endpoints, request and response fields, and behavior can still change. If you call the HTTP API directly, be prepared to update your integration when V2 changes.
The LingoHub CLI (
lh-cli) is coming soon. It's updated together with the API, so once it's released, use it where possible.
What you can do
- Manage workspace members and invitations, stacks, projects, branches and languages.
- Import and export resource files as asynchronous jobs, and see what each import changed.
- Read and edit keys, segments and texts, labels and context images.
- Manage glossaries, terms and style guides.
- Configure LINAs and run them, set up webhooks, and connect Git repositories and CMS integrations.
- Create backups and restore them, activate distribution releases, and manage API keys.
- Close or skip tasks, and read API logs and audit logs.
Base URL
https://api.lingohub.com. All paths start with /v2.
Authentication
Send an API key as a Bearer token: Authorization: Bearer lh-api_…. API V2 accepts API keys only; browser sessions don't work. See API keys.
First request
curl https://api.lingohub.com/v2/workspace \
-H "Authorization: Bearer $LINGOHUB_API_KEY"Conventions
- JSON with
snake_casefield names. Every object has anobject_type. - IDs are public IDs: a type prefix plus a UUID, for example
pr_019f9d57-d0ec-7fa2-…. Use the IDs from responses. API V1 URL slugs aren't accepted. - Timestamps are ISO 8601 in UTC, for example
created_atandupdated_at. - Strict input: unknown fields, unknown query parameters and duplicate JSON keys are rejected, not ignored.
- Updates use
PATCHwith JSON merge-patch: omitted fields stay unchanged, andnullclears a field that allows it.PUTreplaces a complete sub-resource, such as a project's import settings. - Lists use cursor pagination and a
filterparameter. See Pagination and filtering. - Long-running work such as imports, exports, project moves and backup restores returns a job. Poll it until it reaches a final status. See Imports and exports.
- Safe retries: send an
Idempotency-KeywithPOSTrequests, andIf-Matchwith the ETag you read for conditional updates. See Safe retries and conditional updates.
Errors
Errors follow RFC 9457 Problem Details, with a machine-readable code, a request_id to quote to support, and field-level errors. See Errors and rate limits.
Rate limits
Requests are limited per API key and per workspace. Over the limit, the API answers 429 rate_limit_exceeded with a Retry-After header. The RateLimit and RateLimit-Policy headers help you pace requests before that happens.
Guides and recipes
- Pagination and filtering, Errors and rate limits, Safe retries and conditional updates, Imports and exports and Webhooks.
- Step-by-step recipes with Shell and Python code: Import a file, Export translations, Update a translation safely and List with filters and cursors.
Machine-readable docs
- OpenAPI spec:
https://api.lingohub.com/public/api-docs/v2 - Workflow guide, operation index and
llms.txtfor AI agents:https://api.lingohub.com/public/api-v2/
Updated about 1 hour ago