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>"
}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
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
Bearer authentication: a shop API key (WEAVERSE_API_KEY), a scoped API key, a delegated MCP OAuth token, or (translation-unit routes only) a project-bound translation agent token. Scopes: content:read — Read projects, pages, theme settings, versions, drafts and translation units. content:write — Save drafts and make non-destructive edits (page items, metadata, SEO, assignments, languages, glossary). Never publishes or deletes. content:publish — Publish drafts, schedule/reschedule/cancel publications, restore versions, publish global sections. content:delete — Delete pages, global sections, languages, static keys, override reverts; required with project:manage for project deletion. project:manage — Create/copy/delete projects, settings, variants, hierarchy, backups, restore-as-new, previews, hostname policy. translations:read — Read translation units only (no general content access). translations:write — Apply translation units only; never mutates page content. A legacy unscoped API key keeps read/write/translation baseline access and every pre-scope endpoint, but never gains publish/delete/project-manage implicitly.
Path Parameters
Query Parameters
languages, glossary, static, static-keys Body
Response
Operation result
The response is of type object.
Was this page helpful?