API
Integrate Locize into your workflow using our flexible and powerful REST API. The API allows you to fetch, update, and manage translations programmatically — perfect for custom integrations, automation, and advanced localization scenarios.
Getting Started
- You can use the API directly via HTTPS requests, or with our Command Line tool and locizer module.
- The API supports both public and private (API-key protected) endpoints.
- Depending on your CDN type, the API domain may differ:
- Standard: api.lite.locize.app
- Pro: api.locize.app
Tip: Store your API keys securely and never expose write keys in client-side code or public repositories.
Main Capabilities
- Fetch translations for any namespace, version, and language
- Fetch available languages for a project
- Report missing or used translations (for development workflows)
- Update or remove translations in bulk
- Add context or tags to translations
Usage Notes
- All endpoints use standard HTTP verbs (GET, POST).
- Most endpoints require your projectId (and sometimes an API key).
- For large updates, batch your requests (max 1000 keys per request).
- For production, use only read endpoints or API keys with limited permissions.
- See the Going to production guide for best practices.
API Endpoints
Fetch namespace resources
Retrieve all translations for a given namespace, version, and language.
GET https://api.locize.app/{projectId}/{version}/{language}/{namespace}
Example
$ curl -X GET https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/landingpage
# will return something like:
# {
# "Average App": "Average App",
# "Benefits": "Benefits",
# "Blog": "Blog",
# ...
# "privacy policy": "privacy policy",
# "terms of service": "terms of service"
# }(You can find your projectId in your project settings under the API Tab.)
Each of these requests counts as download for your next invoice.
Fetch private namespace resources
Retrieve translations from a private namespace, protected by an API key.
GET https://api.locize.app/private/{projectId}/{version}/{language}/{namespace}
Example
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/private/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/landingpage
# will return something like:
# {
# "Average App": "Average App",
# "Benefits": "Benefits",
# "Blog": "Blog",
# ...
# "privacy policy": "privacy policy",
# "terms of service": "terms of service"
# }(You can find your projectId and API Key in your project settings under the API Tab.)
Each of these requests counts as private download for your next invoice.
Fetch the available languages
Retrieve all languages available for a project, useful for dynamic language selectors.
GET https://api.locize.app/languages/{projectId}
Example
$ curl -X GET https://api.locize.app/languages/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# {
# "en": {
# "name": "English",
# "nativeName": "English",
# "isReferenceLanguage": true,
# "translated": {
# "latest": 1,
# "production": 1
# }
# },
# "de-CH": {
# "name": "German",
# "nativeName": "Deutsch",
# "region": "CH",
# "isReferenceLanguage": false,
# "translated": {
# "latest": 1,
# "production": 0.521
# }
# },
# "it": {
# "name": "Italian",
# "nativeName": "Italiano",
# "isReferenceLanguage": false,
# "translated": {
# "latest": 1,
# "production": 1
# }
# },
# ...
# }Advice:
- This request has a minimum cache duration of 1 hour. (You can find your projectId in your project settings under the API Tab.)
Missing translations
Report missing translations to Locize. This does not replace existing translations.
POST https://api.locize.app/missing/{projectId}/{version}/{language}/{namespace}
Example:
$ body=$(cat << EOF
{
"new.key": "default value",
"another.new.key": "another default value"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/missing/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageOptional context
Add context information for a specific translation.
$ body=$(cat << EOF
{
"new.key": {
"value": "default value",
"context": {
"text": "description for this key"
}
},
"another.new.key": "another default value"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/missing/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageOptional tags
Add tags for a specific translation.
$ body=$(cat << EOF
{
"new.key": {
"value": "default value",
"tags": [
true,
false
]
},
"another.new.key": "another default value"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/missing/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageAdvice:
- You should post missing translation to the reference language first!
- If you send more than 1000 keys, you have to page your request. This means you have to create multiple requests and send a maximum of 1000 keys per request.
- If you get a 412 status code, this means it was an unnecessary request and nothing was missing. If the publishing mode for the requested version is set to manual, you may want to set it to auto publish.
- This request does not generate modification costs in contrast to the update request. (You can find your projectId and API Key in your project settings under the API Tab.)
You should not use this endpoint in production. Read this guide before you're going to production.
Used translations
Report which translations are used. Locize will remember when translations were last used.
POST https://api.locize.app/used/{projectId}/{version}/{language}/{namespace}
Example:
$ body=$(cat << EOF
[
"new.key",
"another.new.key"
]
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/used/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageAdvice:
- To best work with the "not used for" filter in the UI, you may do this requests for your reference language.
- If you send more than 1000 keys, you have to page your request. This means you have to create multiple requests and send a maximum of 1000 keys per request. (You can find your projectId and API Key in your project settings under the API Tab.)
You should not use this endpoint in production. Read this guide before you're going to production.
Update/Remove translations
Update or delete translations. Useful for integrating with other systems.
POST https://api.locize.app/update/{projectId}/{version}/{language}/{namespace}
To completely replace a namespace set the query parameter replace to true. This will remove all the keys in that namespace that are not included in your body. If you have more than 1000 keys in a namespace, we do consider NOT to use the replace parameter, this will probably delete more keys than you want to.
If you need to change or remove multiple keys, please do not create a single http request per key, but put them together in batches of maximum 1000 keys.
Example:
$ body=$(cat << EOF
{
"new.key": "default value",
"another.existing.key": "another changed value",
"a.key.to.delete": null
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpage
$ # or (Be aware, using the replace=true parameter will delete all non passed keys!):
$ # curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpage?replace=trueOptional context
Add context information for a specific translation.
$ body=$(cat << EOF
{
"new.key": {
"value": "default value",
"context": {
"text": "description for this key"
}
},
"another.existing.key": "another changed value",
"a.key.to.delete": null
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageOptional tags
Add tags for a specific translation.
$ body=$(cat << EOF
{
"new.key": {
"value": "default value",
"tags": [
true,
false
]
},
"another.new.key": "another default value"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageOptional quality
Indicate the quality of the text content.
$ body=$(cat << EOF
{
"new.key": {
"value": "default value",
"quality": "MT" // MT = Machine Translation, AI = generative AI, TM = Translation Memory, HT = Human Translation
},
"another.new.key": "another default value"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpageOptional review
Use the review workflow if enabled.
$ body=$(cat << EOF
{
"a.key": "esto se añadirá automáticamente",
"meal": "me gusta comer pan"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/es/common?review=trueThis will create a new review:

Optional autotranslate
By default, new keys get automatically translated. To trigger automatic translation for existing keys, use this option.
$ body=$(cat << EOF
{
"an.existing.key": "This will get automatically translated",
"a.new.key": "And this will get automatically translated anyway"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/common?autotranslate=trueAdvice:
- You should post translation to the reference language first!
- If you send more than 1000 keys, you have to page your request. This means you have to create multiple requests and send a maximum of 1000 keys per request. If this is the case, please do not use the
replacequery parameter. - Do NOT create a single request per individual key, but include up to 1000 keys in a single request.
- If you get a 429 status code, this means you are sending too many requests for the same namespace and should slow down to send requests and/or make sure you're NOT creating a single request per key.
- If you get a 412 status code, this means it was an unnecessary request and nothing did change. If the publishing mode for the requested version is set to manual, you may want to set it to auto publish.
- Do not use the review option in combination with the replace option. (You can find your projectId and API Key in your project settings under the API Tab.)
You should not use this endpoint in production. Read this guide before you're going to production.
List all namespace resources
If you need an overview of all published translation files of your project, you can do this with a simple HTTP GET request with this url pattern:
https://api.locize.app/download/{projectId}/{version}/{language}/{namespace}
{namespace}, {language} and {version} are optional and are used as filter.
example:
$ curl -X GET https://api.locize.app/download/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/common",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/common",
# "size": 42,
# "lastModified": "2017-11-23T19:39:16.000Z"
# },
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/landingpage",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/landingpage",
# "size": 21,
# "lastModified": "2017-11-23T18:39:16.000Z"
# },
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/common",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/common",
# "size": 103,
# "lastModified": "2017-11-23T19:37:16.000Z"
# },
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/common",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/common",
# "size": 12,
# "lastModified": "2017-11-23T19:29:16.000Z"
# },
# ...
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/common",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/common",
# "size": 236,
# "lastModified": "2017-11-24T19:39:16.000Z"
# },
# {
# "url": "https://api.locize.app/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/common",
# "key": "3d0aa5aa-4660-4154-b6d9-907dbef10bb2/production/en/common",
# "size": 417,
# "lastModified": "2017-11-23T13:39:16.000Z"
# }
# ]Advice:
- By providing the appropriate API key as bearer token you can also retrieve information about your private namespace resources. (if using the private publishing feature)
example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/download/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [
# {
# "url": "https://api.locize.app/private/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/common",
# "key": "private/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/de/common",
# "size": 42,
# "lastModified": "2017-11-23T19:39:16.000Z",
# "isPrivate": true
# },
# ...(You can find your projectId and API Key in your project settings under the API Tab.)
You should not use this endpoint in production. If you need to know the lastModified timestamp of a specific namespace, you should parse the
last-modifiedheader in the Fetch namespace resources response.
Fetch/filter the (unpublished) namespace resources
Sometimes in your localization process you want to know which are the translations that are approved by your reviewer. Assuming you have defined some tags to mark translations as approved, with this api you're able to filter by these tags. This is pretty easy.
It's a simple HTTP GET request with this url pattern:
https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}
with positive tags filter: https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?tags=[0,2] (you need to pass the tag index)
in combination with a negative tags filter: https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?tags=[0,2]&!tags=[1]
Another use case could be to track the amount of words changed during a time period. To do this, you can pull the translations at period 1, save this state and the current timestamp and later at period 2 you can pull again with an additional filter.
i.e. get all translations updated after 2017-12-06T19:42:18.139Z (UTC): https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?updatedAt=>1512589338139 (number of milliseconds since 1970/01/01)
i.e. get all translations updated before 2017-12-06T19:42:18.139Z (UTC): https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?updatedAt=<1512589338139
In the same way there is also the createdAt filter.
Additionally another use case could be to remove unused translations. (This is only possible if you make use of the Used translations endpoint) To do this, you can pull the translations with an additional filter.
i.e. get all translations used after 2017-12-06T19:42:18.139Z (UTC): https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?lastUsed=>1512589338139 (number of milliseconds since 1970/01/01)
i.e. get all translations used before 2017-12-06T19:42:18.139Z (UTC): https://api.locize.app/pull/{projectId}/{version}/{language}/{namespace}?lastUsed=<1512589338139
example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/pull/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpage
# will return something like:
# {
# "Average App": "Average App",
# "Benefits": "Benefits",
# "Blog": "Blog",
# ...
# "privacy policy": "privacy policy",
# "terms of service": "terms of service"
# }(You can find your projectId and API Key in your project settings under the API Tab.) There is also an option to ask for more segment information with the query parameter raw=true
example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/pull/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpage?raw=true
# will return something like:
# {
# "Average App": {
# "value": "Average App",
# "tags": [
# null,
# true
# ],
# "context": {
# "text": "This text is placed..."
# },
# "quality": "MT", // MT = Machine Translation, AI = generative AI, TM = Translation Memory, HT (or undefined) = Human Translation
# "updatedAt": 1610004393330
# },
# ...
# }(You can find your projectId and API Key in your project settings under the API Tab.)
You should not use this endpoint in production. To fetch the translation in production, please use the Fetch namespaces resources endpoint. Each of these requests counts as private download for your next invoice.
Fetch configured project tags
You may have defined some tags to mark translations as approved, etc. With this api you're able to fetch these tags.
A very simple HTTP GET request with this url pattern:
https://api.locize.app/tags/{projectId}
example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/tags/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [
# "translated",
# "reviewed",
# "approved"
# ](You can find your projectId and API Key in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Versioning
Copy version
If you are using multiple versions of your translations you can ask Locize to copy (replace) all translations from one version to the other. For example this is very useful when you release your translation files from one version to the other via your custom tooling. It's the same behavior like Overwriting via the UI.
This is easy. It's a HTTP POST request without body with this url pattern:
https://api.locize.app/copy/{projectId}/version/{fromVersion}/{toVersion}
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/copy/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/version/latest/productionHint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint.
- If your API Key has the admin role, the toVersion can also be a new version. This will create a new version based on the "fromVersion".
(You can find your projectId and API Key in your project settings under the API Tab. Keep in mind to use the API Key for
{toVersion})
Copy language from version to other version
For a more granular copy action, you can ask Locize to copy (replace) all translations from one version to the other for a particular language.
Another HTTP POST request without body with this url pattern:
https://api.locize.app/copy/{projectId}/version/{fromVersion}/{toVersion}/{language}
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/copy/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/version/latest/production/enHint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint.
(You can find your projectId and API Key in your project settings under the API Tab. Keep in mind to use the API Key for
{toVersion})
Publish version
If you want to fully automate your CI/CD pipeline by publishing a version exactly at the same time when you deploy a new version of your product this api call is exactly what you are looking for.
This is very easy. It's a HTTP POST request without body with this url pattern:
https://api.locize.app/publish/{projectId}/{version}
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/publish/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/productionFor parent projects in a multi-tenant setup, you can optionally pass the query parameter ?tenants=true to automatically publish also all tenant projects.For parent projects with branches, you can optionally pass the query parameter ?branches=true to automatically publish also all branched projects.
Hint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint.
(You can find your projectId and API Key in your project settings under the API Tab. Keep in mind to use the API Key for the correct
{version})
Add new version
This is the same as adding a new version via UI.
https://api.locize.app/version/{projectId}/{version}
The body optionally contains
- autoPublish
trueorfalse, defaults tofalse - cacheControlMaxAge
number, amount of seconds used for Cache-control max-age
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/version/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/v0.9.6
$ # or (optionally set autoPublsh to true):
$ # body=$(cat << EOF
# {
# "autoPublish": true
# "cacheControlMaxAge": 3600
# }
# EOF
# )
# curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/version/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/v0.9.6Hint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint. (You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Remove Version
https://api.locize.app/version/{projectId}/{version}
example:
$ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/version/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/tmp-versionHint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint. (You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Get async job
To wait for an async action (i.e. copy, copy language, publish, remove version) to be completed, you can make use this endpoint.
It's a simple HTTP GET request without body with this url pattern:
https://api.locize.app/jobs/{projectId}/{jobId}
Pull this endpoint with an interval of at least 2 seconds until no job object is returned anymore. The job is done as soon as no job object is returned. Depending on how big your project is it may take also several minutes until the job gets finished. (for example for the copy version job)
example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/jobs/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/410aa5aa-4660-4154-b6d9-907dbef10bb5
$ # {"projectId":"3d0aa5aa-4660-4154-b6d9-907dbef10bb2","jobId":"0bb35e4a-8f16-4997-866a-1332a59825e0","event":"saveVersionRequested","startedAt":1525094049152}(You can find your projectId and API Key in your project settings under the API Tab.)
Sometimes you want to automate even more. I.e if you want to create your own translation management ui. The following endpoints are probably what you are looking for.
Create a new namespace
https://api.locize.app/create/{projectId}/{version}/{namespace}
A body containing initial values is optional.
It will create a new namespace in your reference language.
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/create/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/landingpage(You can find your projectId and API Key in your project settings under the API Tab.)
Create a new namespace in a specific language
https://api.locize.app/create/{projectId}/{version}/{language}/{namespace}
A body containing initial values is optional.
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/create/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/en/landingpage(You can find your projectId and API Key in your project settings under the API Tab.)
Rename a namespace in all languages
https://api.locize.app/rename/{projectId}/{version}/{fromNamespace}/{toNamespace}
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/rename/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/landingpage/landingpagenew(You can find your projectId and API Key in your project settings under the API Tab.)
Delete a namespace from all languages
https://api.locize.app/delete/{projectId}/{version}/{namespace}
example:
$ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/delete/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest/landingpage(You can find your projectId and API Key in your project settings under the API Tab.)
Language functionality
Add new language
This is the same as adding a new language via UI.
https://api.locize.app/language/{projectId}/{language}
example (will add that language to all versions):
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/enOptionally, specify in which versions you want to add that language:
$ body=$(cat << EOF
{
"versions": ["latest", "production"]
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/en(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Remove language
https://api.locize.app/language/{projectId}/{language}
example:
$ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/enOptionally, specify in which versions you want to update languages:
$ body=$(cat << EOF
{
"versions": ["latest", "production"]
}
EOF
)
$ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/en(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Update languages
Set the languages at once. Languages not passed via request, are removed.
https://api.locize.app/language/{projectId}
example:
$ body=$(cat << EOF
[
"en",
"de",
"it"
]
EOF
)
$ curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2Optionally, specify in which versions you want to update languages:
$ body=$(cat << EOF
{
"latest": ["en", "de", "it"],
"production": ["en", "de"]
}
EOF
)
$ curl -X PUT -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/language/3d0aa5aa-4660-4154-b6d9-907dbef10bb2(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Users
Invite new users
https://api.locize.app/invite/{projectId}
The body contains
- email the user's email address
- role can be
"user"or"publisher"or"manager"or"accountant"or"admin"(default:"user") - scope is an object describing a scope restriction (default: empty arrays for languages and versions)
To skip sending the email automatically set the query parameter
sendto false. This will not send any email. This way you can send the invitation mail by your own, if you want to.
example:
$ body=$(cat << EOF
{
"email": "new.user@somewhere-in-the-universe.com",
"role": "user",
"scope": {
"languages": ["en","de"],
"versions": ["latest","preprod"]
}
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/invite/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
$ # or:
$ # curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/invite/3d0aa5aa-4660-4154-b6d9-907dbef10bb2?send=false
# will return something like:
# {
# "code": "LL4mHDzyxKn4cKYP",
# "role": "user",
# "email": "new.user@somewhere-in-the-universe.com",
# "scope": {
# "languages":["en","de"],
# "versions":["latest","preprod"]
# },
# "link": "https://www.locize.app/register?invitation=LL4mHDzyxKn4cKYP"
# }(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Fetch users
Retrieve all users of a project.
GET https://api.locize.app/users/{projectId}
Example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/users/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [
# {
# "id":"ba175147-c7a3-45d2-9b24-739ae2ed948c",
# "firstname": "George",
# "lastname": "Winston",
# "username": "gg.win",
# "email": "george.user@somewhere-in-the-universe.com",
# "role": "user",
# "scope": {
# "languages": ["en","de"],
# "versions": ["latest","preprod"]
# }
# }
# ...
# ](You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Statistics
Statistics: project
Retrieve project statistics, similar to the overview images in the Locize UI.
GET https://api.locize.app/stats/project/{projectId}
Example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/stats/project/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# {
# "latest":{
# "en":{
# "ns1":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":10,
# "segmentsTotal":10
# },
# "anotherNamespace":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":1,
# "segmentsTotal":1
# }
# },
# "de":{
# "ns1":{
# "translated":0.7,
# "untranslated":0.3,
# "ordered":0,
# "segmentsTranslated":7,
# "segmentsTotal":10
# },
# "anotherNamespace":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":1,
# "segmentsTotal":1
# }
# }
# },
# "prod":{
# "en":{
# "ns1":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":5,
# "segmentsTotal":5
# },
# "anotherNamespace":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":1,
# "segmentsTotal":1
# }
# },
# "de":{
# "ns1":{
# "translated":1,
# "untranslated":0,
# "ordered":0,
# "segmentsTranslated":5,
# "segmentsTotal":5
# },
# "anotherNamespace":{
# "translated":0.7142857142857143,
# "untranslated":0.2857142857142857,
# "ordered":0,
# "segmentsTranslated":5,
# "segmentsTotal":7
# }
# }
# }
# }(You can find your projectId and API Key in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Statistics: user
Retrieve statistics for a specific user or all users in a project.
GET https://api.locize.app/stats/user/{projectId}/{userId}
or for all users:
GET https://api.locize.app/stats/users/{projectId}
To retrieve an other year than the current one set the query parameter year with the appropriate value.
Example:
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/stats/user/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/ba175147-c7a3-45d2-9b24-739ae2ed948c
# will return something like:
# {
# "userId":"ba175147-c7a3-45d2-9b24-739ae2ed948c",
# "year":2019,
# "words":{ // amount of words saved per month
# "0":23,
# "1":54,
# "2":16,
# ...
# },
# "modifications":{ // amount of modifications per month
# "0":2,
# "1":6,
# "2":1,
# ...
# },
# "tagsSet":{ // amount of tags set per month by tag index
# "0":{
# "2":12,
# "4":7
# },
# "1":{
# "2":5,
# "4":18,
# "5":21
# },
# "2":{
# "4":1,
# "5":24
# }
# ...
# },
# "tagsUnset":{ // amount of tags unset per month by tag index
# "0":{
# "0":2,
# "1":7
# },
# "1":{
# "0":5,
# "1":18,
# "2":49
# },
# "2":{
# "1":10,
# "2":34
# }
# ...
# }
# "updatedAt":1514926256221,
# }
$ curl -X GET -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/stats/users/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# [
# {
# "userId":"ba175147-c7a3-45d2-9b24-739ae2ed948c",
# "year":2019,
# "words":{ // amount of words saved per month
# "0":23,
# "1":54,
# "2":16,
# ...
# }
# "modifications":{ // amount of modifications per month
# "0":2,
# "1":6,
# "2":1,
# ...
# },
# "tagsSet":{ // amount of tags set per month by tag index
# "0":{
# "2":12,
# "4":7
# },
# "1":{
# "2":5,
# "4":18,
# "5":21
# },
# "2":{
# "4":1,
# "5":24
# }
# ...
# },
# "tagsUnset":{ // amount of tags unset per month by tag index
# "0":{
# "0":2,
# "1":7
# },
# "1":{
# "0":5,
# "1":18,
# "2":49
# },
# "2":{
# "1":10,
# "2":34
# }
# ...
# }
# "updatedAt":1514926256221,
# },
# ...
# ](You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Tenant functionality
Create a new tenant project
https://api.locize.app/tenant/create/{projectId}
The body contains
- name the project's name (required)
- company the company name of the tenant
- projectUrl an url that represents the tenant project
- canEditLanguages defines if the tenant user can add or remove languages, can be
trueorfalse(default:false) - subscribeToParent adds the tenant project to the collective billing of the main/parent project (1 invoice for everything), can be
trueorfalse(default:false) - referenceLanguage you can optionally pass a different reference language compared to the parent project, if not provided the same referenceLanguage like in the parent project is used This response will include the id, that can be used other api endpoints.
example:
$ body=$(cat << EOF
{
"name": "My tenant's project"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/tenant/create/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# {
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "My tenant's project",
# "slug": "0nod9b95"
# }(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Update tenant project settings
https://api.locize.app/tenant/update/{projectId}/{tenantProjectId}
The body contains
- canEditLanguages can be
trueorfalse(default:false) This response will include the id, that can be used other api endpoints.
example:
$ body=$(cat << EOF
{
"canEditLanguages": true
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/tenant/update/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/ad0aa5aa-2660-4154-b6d9-907dbef10bb3
# will return something like:
# {
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "My tenant's project",
# "slug": "0nod9b95"
# }(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Subscribe tenant project
https://api.locize.app/tenant/subscribe/{projectId}/{tenantProjectId}
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/tenant/subscribe/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/ad0aa5aa-2660-4154-b6d9-907dbef10bb3
# will return something like:
# {
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "My tenant's project",
# "slug": "0nod9b95"
# "subscribedAt": 1763647526299
# }(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
List all tenants of project
https://api.locize.app/tenants/{projectId}
example:
$ curl -X GET -H "Authorization: Bearer <API_KEY>" https://api.locize.app/tenants/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [
# {
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "My tenant's project",
# "slug": "0nod9b95"
# },
# {
# "id": "a3b6631d-6439-4e4c-bbd3-3196d87df2d3",
# "name": "My other (subscribed) tenant's project",
# "slug": "1m2d9b7n",
# "subscribedAt": 1763649514321
# }
# ](You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Branches functionality
Create a new branched project
https://api.locize.app/branch/create/{projectId}/version
The body contains
- name the branch's name (required) This response will include the id, that can be used other api endpoints.
example:
$ body=$(cat << EOF
{
"name": "feature-x-y"
}
EOF
)
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" -d $body https://api.locize.app/branch/create/3d0aa5aa-4660-4154-b6d9-907dbef10bb2/latest
# will return something like:
# {
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "feature-x-y",
# "version": "latest",
# "slug": "0nod9b95"
# }(You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
List all branches of project
https://api.locize.app/branches/{projectId}
example:
$ curl -X GET -H "Authorization: Bearer <API_KEY>" https://api.locize.app/branches/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# [{
# "id": "66a6631d-6439-4e4c-bbd3-3196d87dfdf4",
# "name": "feature-branch-x-y",
# "version": "latest",
# "slug": "0nod9b95"
# }](You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
You should use this endpoint sparingly. A few (1-10) requests per hour.
Merge a branch
https://api.locize.app/branch/merge/{projectId}?delete=true
example:
$ curl -X POST -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/branch/merge/3d0aa5aa-4660-4154-b6d9-907dbef10bb2?delete=true
# will return something like:
# {
# "jobId": "16a6631d-6439-4e4c-bbd3-3196d87dfdf8"
# }Hint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint. (You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)
Delete a branch
https://api.locize.app/branch/{projectId}
example:
$ curl -X DELETE -H "Content-Type: application/json" -H "Authorization: Bearer <API_KEY>" https://api.locize.app/branch/3d0aa5aa-4660-4154-b6d9-907dbef10bb2
# will return something like:
# {
# "jobId": "16a6631d-6439-4e4c-bbd3-3196d87dfdf8"
# }Hint:
- The response body contains a jobId, which you can use to check if asynchronous action has been completed with the Get async job endpoint. (You can find your projectId and API Key (requires admin role) in your project settings under the API Tab.)