curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/localization \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "add-language",
"code": "de",
"languageCode": "de"
}
'{
"object": "language_upserted",
"language": {
"id": "clza1l2g30003lg01lang0003",
"code": "de",
"name": "",
"languageCode": "de",
"projectId": "clz8p2k0q0001ab12cd34ef56",
"isDefault": false,
"baseLocale": null,
"staticTranslations": null,
"createdAt": "2026-10-15T11:40:02.000Z",
"updatedAt": "2026-10-15T11:40:02.000Z"
}
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}Languages and localization
Manage languages, glossary and static text
Runs one localization operation, selected by op. Language and static text changes are live project state (no draft or publish step) and refresh the storefront cache. Glossary entries are translation aids, not storefront content.
Operations:
add-language(content:write): adds a language bycodeandlanguageCode(2-35 characters each;codeis lowercased). Re-adding an existing language is a no-op and returnslanguage: null; re-adding a deleted one revives it with its translations.delete-language(content:delete,confirmequal tolanguageId): deletes a language under the project lock and advances the project revision, so drafts captured against the old language set are fenced. A missing or foreign id returns404with nothing written.static-save(content:write): mergestranslations(flattened key to value, e.g.cart.title) into languagelanguageId’s static text. An empty string removes that key’s value. Returns the number of keys sent.static-key-default(content:write): sets the default value of static keykeyId(max 20,000 characters).static-key-delete(content:delete,confirmequal tokeyId): deletes a static key.glossary-upsert(content:write): creates an entry, or updates entryidwhen given.sourceTerm(1-200 characters) is required; optionaldoNotTranslate,caseSensitive(both defaultfalse) andnotes(max 2,000).glossary-delete(content:delete,confirmequal toentryId): deletes a glossary entry.
delete-language returns cacheDelivery: "degraded" when the delete committed but the cache refresh failed. A wrong confirm value returns 400 INVALID_PARAMS.
Required scope: content:write (all operations); delete-language, static-key-delete and glossary-delete also need content:delete
POST
/
projects
/
{projectId}
/
localization
curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/localization \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "add-language",
"code": "de",
"languageCode": "de"
}
'{
"object": "language_upserted",
"language": {
"id": "clza1l2g30003lg01lang0003",
"code": "de",
"name": "",
"languageCode": "de",
"projectId": "clz8p2k0q0001ab12cd34ef56",
"isDefault": false,
"baseLocale": null,
"staticTranslations": null,
"createdAt": "2026-10-15T11:40:02.000Z",
"updatedAt": "2026-10-15T11:40:02.000Z"
}
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}{
"object": "error",
"code": "UNAUTHORIZED",
"message": "<string>",
"status": 123,
"details": "<unknown>"
}Authorizations
Query Parameters
Body
application/json
Response
Operation result
The response is of type object.
Was this page helpful?