Manual
CLI
API
Log in Get started free

Pull translations

Returns the translations of one language as `{ "key": "text" }`. For the source language it returns the source strings. See also [Pull translations for your build]({{< ref "/api/guides/pull-translations" >}}).

Returns the translations of one language as { "key": "text" }. For the source language it returns the source strings. See also Pull translations for your build.

HTTP
GET /projects/{projectId}/pull

Access: Session token, or an API key with the translations:read scope.

Role: Any role in the project.

Path parameters #

ParameterDescription
projectIdThe id of the project.

Query parameters #

ParameterRequiredDescription
languageyesA language code of the project, or its source language. Not case sensitive.
branchnoThe branch name. Unknown or missing names fall back to the protected branch.
tagnoThe name of a tag. Returns the snapshot of that tag instead of a branch, and branch is ignored.
statusnoapproved (default) returns published translations. all also returns drafts and ones waiting for review.

Response 200 #

The translations.

JSON
{
  "branch": "main",
  "tag": null,
  "language": "de-de",
  "total": 2,
  "translated": 1,
  "keys": { "checkout.title": "Kasse" }
}

Response fields #

FieldTypeDescription
branchstringThe branch that was read. For a tag, the branch the tag was taken from.
tagstring or nullThe tag that was read, or null when a branch was read.
languagestringThe language code.
totalintegerKeys with a source text.
translatedintegerKeys with a published translation. When the project does not require review, translations in review count as published.
keysobjectKey name to text. Only keys that have a text, and are published unless status=all.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
404not_foundThe project does not exist in your organisation, you have no access to it, or projectId is not a UUID.
404not_foundtag is given and the project has no tag with that name.
404not_foundlanguage is not a language of the project and not its source language.
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.