Overview
Read and change translations from scripts, build pipelines and AI agents.
Sign requests with a personal API key, created on the API keys page in Sleekdocs Translate: Authorization: Bearer sdt_…. A key acts as the person who made it, with the scopes chosen for it, and never more than that person's role in the team allows. Each operation lists the scope it needs.
Texts written through the API land in the working copy, unpublished, as edits in the app do. Publish and deploy to release them.
Every answer is JSON. Data comes in {"data": …}; an error in {"errors": ["CODE"]}. Each key may make 120 requests a minute.
The paths under /v1 are stable: fields may be added, but nothing is removed or renamed without a /v2.
Every path below starts at https://translate.sleekdocs.com/api. Create a key on the API keys page in Sleekdocs Translate; the docs explain scopes and show a few calls end to end.
Machine-readable: the OpenAPI description this page is built from, for code generators and AI agents.
Account
Who the caller is and what the key may do.
Who am I
GET /v1/api/translate/me Any key
The caller, and for an API key its team, scopes, project limit and expiry. Use it to check what a key may do before trying.
Answer
{
"data": {
"user": {
"uuid": "e8767d89-28db-4305-895e-4129f4f299b3",
"email": "anna@example.com",
"name": "Anna Berg"
},
"team": {
"uuid": "1dd96084-3b09-4098-8bf1-b6348362e98e",
"name": "Example AB"
},
"key": {
"uuid": "e45739df-487b-4448-bdd4-af9359f5836d",
"name": "CI pipeline",
"scopes": [
"read",
"write"
],
"projectUuid": "d6523c38-886e-47b4-9542-e7ba062d1078",
"expiresAt": "2026-11-14T19:33:45Z"
}
}
}
Projects
The team's projects and their languages.
List projects
GET /v1/api/translate/projects Scope read
The projects in the caller's team, with how much of each language is translated. An API key lists its own team, or only its project if it is limited to one; a signed-in user names the team with team.
Parameters| Parameter | In | Description |
|---|
team | query, optional | The team, for a signed-in user. An API key always uses its own team. |
|---|
Answer
{
"data": [
{
"uuid": "d6523c38-886e-47b4-9542-e7ba062d1078",
"name": "Storefront",
"primaryLanguage": "en",
"keys": 387,
"languages": [
{
"code": "en",
"name": "English",
"primary": true,
"translated": 387,
"untranslated": 0
},
{
"code": "sv",
"name": "Swedish",
"primary": false,
"translated": 382,
"untranslated": 5
}
]
}
]
}
Get a project
GET /v1/api/translate/projects/{projectUuid} Scope read
A project's languages and counts, each language's latest revision and unpublished changes, and which revision is deployed in each environment.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
Answer
{
"data": {
"uuid": "d6523c38-886e-47b4-9542-e7ba062d1078",
"name": "Storefront",
"primaryLanguage": "en",
"fileFormat": "JSON_FLAT",
"keys": 387,
"languages": [
{
"code": "en",
"name": "English",
"primary": true,
"translated": 387,
"untranslated": 0,
"latestRevision": 18,
"unpublishedChanges": 0,
"deployed": {
"DEV": 18,
"TEST": 18,
"PROD": 17
}
},
{
"code": "sv",
"name": "Swedish",
"primary": false,
"translated": 382,
"untranslated": 5,
"latestRevision": 10,
"unpublishedChanges": 3,
"deployed": {
"DEV": 10,
"TEST": 10,
"PROD": 10
}
}
]
}
}
Keys and texts
Read and change keys and texts in the working copy.
List keys and texts
GET /v1/api/translate/projects/{projectUuid}/keys Scope read
Every key with its texts in the working copy, optionally filtered by language, status and a search.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
lang | query, optional | Language codes to include, comma-separated, such as en,sv. Default: all. |
|---|
status | query, optional | Only keys that are untranslated, the same as the primary language, or changed since the latest publish, in at least one of the languages. Values: untranslated, same-as-primary, changed. |
|---|
q | query, optional | Only keys whose name or texts contain this, ignoring case. |
|---|
Answer
{
"data": [
{
"key": "checkout.title",
"values": {
"en": "Checkout",
"sv": "Kassa"
}
},
{
"key": "checkout.pay_now",
"values": {
"en": "Pay now",
"sv": null
}
}
]
}
Add or update keys and texts
PATCH /v1/api/translate/projects/{projectUuid}/keys Scope write
Adds or updates up to 1,000 keys and their texts in the working copy, in one call. upsert adds new keys and changes texts; create-only adds new keys and leaves existing ones alone. With dryRun nothing is written and the answer says what would change. A null text leaves that language as it is. Adding keys also needs the keys scope.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
Request body
{
"mode": "upsert",
"dryRun": false,
"items": [
{
"key": "checkout.title",
"values": {
"en": "Checkout",
"sv": "Kassa"
}
},
{
"key": "cart.empty",
"values": {
"sv": "Din varukorg är tom"
}
}
]
}
Answer
{
"data": {
"dryRun": false,
"created": [
"checkout.title"
],
"updated": [
"cart.empty"
],
"unchanged": [
"account.sign_out"
],
"skipped": []
}
}
Rename a key
POST /v1/api/translate/projects/{projectUuid}/keys/rename Scope keys
Renames a key in every language, keeping its texts.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
Request body
{
"from": "checkout.title",
"to": "checkout.heading"
}
Answer
{
"data": {
"key": "checkout.heading"
}
}
Delete a key
DELETE /v1/api/translate/projects/{projectUuid}/keys/{key} Scope keys
Deletes a key and its texts in every language.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
key | path, required | The key, URL-encoded. |
|---|
Answer
{
"data": null
}
Files and revisions
Whole language files, imports and comparisons.
Download a file
GET /v1/api/translate/projects/{projectUuid}/languages/{languageCode}/file Scope read
A language as a JSON file, the same shape your app loads from the CDN. By default the working copy in the project's file format.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
languageCode | path, required | A language code in the project, such as sv. |
|---|
format | query, optional | flat or nested. Default: the project's file format. Values: flat, nested. |
|---|
revision | query, optional | working (the default), latest for the latest published revision, or a revision number. |
|---|
Answer
{
"checkout.title": "Kassa",
"checkout.pay_now": "Betala nu"
}
Import a file
PUT /v1/api/translate/projects/{projectUuid}/languages/{languageCode}/file Scope write
Imports a JSON file, nested or flat, into a language's working copy. update changes the texts in the file and leaves the rest; replace also removes texts for keys the file doesn't have. With dryRun nothing is written. The answer lists the changes. A file that adds keys also needs the keys scope.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
languageCode | path, required | A language code in the project, such as sv. |
|---|
mode | query, optional | update (the default) or replace. Values: update, replace. |
|---|
dryRun | query, optional | Only report what would change. |
|---|
Request body
{
"checkout": {
"title": "Kassa",
"pay_now": "Betala nu"
}
}
Answer
{
"data": {
"dryRun": false,
"mode": "UPDATE",
"changes": {
"nCreated": 1,
"nUpdated": 0,
"nDeleted": 0,
"nUnchanged": 1,
"nNewKeys": 1,
"created": [
{
"key": "checkout.title",
"oldValue": "",
"newValue": "Kassa",
"newKey": true
}
],
"updated": [],
"deleted": []
}
}
}
Compare revisions
GET /v1/api/translate/projects/{projectUuid}/languages/{languageCode}/diff Scope read
What was added, changed and removed between two revisions of a language, or between a revision and the working copy. By default, from the latest published revision to the working copy: what publishing would release.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
languageCode | path, required | A language code in the project, such as sv. |
|---|
from | query, optional | working, latest (the default) or a revision number. |
|---|
to | query, optional | working (the default), latest or a revision number. |
|---|
Answer
{
"data": {
"nCreated": 1,
"nUpdated": 1,
"nDeleted": 0,
"nUnchanged": 380,
"nNewKeys": 0,
"created": [
{
"key": "account.orders",
"oldValue": "",
"newValue": "Mina beställningar",
"newKey": false
}
],
"updated": [
{
"key": "checkout.pay_now",
"oldValue": "Betala",
"newValue": "Betala nu",
"newKey": false
}
],
"deleted": []
}
}
Releases
Publish revisions and deploy them to the CDN.
Publish languages
POST /v1/api/translate/projects/{projectUuid}/publish Scope publish
Saves each chosen language's working copy as its next revision. "changed" (the default) publishes every language with unpublished changes; or list language codes. Languages without changes are skipped. The key's owner also needs a deploy right in the team.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
Request body
{
"languages": "changed"
}
Answer
{
"data": {
"published": [
{
"language": "sv",
"revision": 11
}
],
"skipped": [
{
"language": "en",
"reason": "NO_CHANGES"
}
]
}
}
Deploy languages
POST /v1/api/translate/projects/{projectUuid}/deploy Scope deploy:<env>
Puts a revision of each chosen language on the CDN for one environment, at https://cdn.sleekdocs.com/<project>/<env>/<language>.json, in the project's file format. languages is "all" (the default) or a list of codes; revision is "latest" (the default) or a number, which needs exactly one language. A language already at that revision is skipped (ALREADY_DEPLOYED), one never published too (NEVER_PUBLISHED). A failed upload is reported in failed and doesn't undo the others. Needs the deploy:<env> scope and the owner's deploy right for that environment.
Parameters| Parameter | In | Description |
|---|
projectUuid | path, required | The project's ID, from List projects or the project page in Translate. |
|---|
Request body
{
"env": "test",
"languages": "all",
"revision": "latest"
}
Answer
{
"data": {
"env": "TEST",
"deployed": [
{
"language": "sv",
"revision": 11
}
],
"skipped": [
{
"language": "en",
"reason": "ALREADY_DEPLOYED"
}
],
"failed": []
}
}