curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/global-sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "save-draft",
"items": [
{
"id": "clz9h1a2b0003gs01hdr0001",
"type": "header",
"data": {
"sticky": false
},
"children": [
{
"id": "clz9h1a2b0004gs01nav0002"
}
]
},
{
"id": "clz9h1a2b0004gs01nav0002",
"type": "header-menu",
"data": {
"menu": "main-menu"
},
"children": []
}
],
"expectedHeadVersionId": null
}
'{
"publishedAt": "2026-10-15T12:02:44.000Z",
"pageRevisions": {
"clz8q1m2n0002pg01home0001": "2026-10-15T12:02:44.000Z",
"clz8q1m2n0003pg01prod0002": "2026-10-15T12:02:44.000Z"
},
"sectionId": "clz9g7x1k0001gs0secn0001",
"projectId": "clz8p2k0q0001ab12cd34ef56",
"versionId": "clzb3v0d10007gsv0ver0007",
"rootItemId": "clz9h1a2b0003gs01hdr0001",
"pageIds": [
"clz8q1m2n0002pg01home0001",
"clz8q1m2n0003pg01prod0002"
]
}{
"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>"
}{
"object": "error",
"code": "STALE_PAGE",
"message": "GLOBAL_SECTION_DRAFT_STALE",
"status": 409
}Rename, delete, or draft and publish a global section
Runs one operation on a global section, selected by op. A section has its own draft lifecycle, separate from page drafts: save-draft stores a draft only, and nothing reaches storefronts until publish-draft. rename and delete take effect immediately.
Operations:
save-draft(content:write): savesitems(1-500 items, the full item shape; a malformed graph returns400) as the section’s shared draft.expectedHeadVersionIdmust name the current draft head (nullwhen there is none); if another save moved the head, the call returns409 STALE_PAGE. Re-read with GET and retry. An exact retry of a save whose response was lost is recognized and returns the same head. Not live.discard-draft(content:write): drops the draft head named byversionId. Live content is untouched.publish-draft(content:publish): makes draftversionIdlive on every page that renders the section, advances those pages’ revisions and clears the draft head.pageIdslists the pages it advanced. Retrying a publish that already committed returns the stored receipt without rewriting content.409 STALE_PAGEmeans the draft or the live section changed shape during the publish.rename(content:write): renames the section (name, 1-191 characters). Live immediately.delete(content:delete, plusconfirmequal to thesectionId): unshares the section. Every page that rendered it keeps a page-local copy of the content, then the section is removed. Live immediately.
publish-draft and delete return cacheDelivery: "degraded" when the content change is committed but the storefront cache refresh is still queued for retry. Do not repeat the operation; storefronts catch up when the retry lands.
A wrong confirm value returns 400 INVALID_PARAMS.
Required scope: content:write (all operations); publish-draft also needs content:publish, delete also needs content:delete
curl --request POST \
--url https://studio.weaverse.io/api/v1/content/projects/{projectId}/global-sections/{sectionId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"op": "save-draft",
"items": [
{
"id": "clz9h1a2b0003gs01hdr0001",
"type": "header",
"data": {
"sticky": false
},
"children": [
{
"id": "clz9h1a2b0004gs01nav0002"
}
]
},
{
"id": "clz9h1a2b0004gs01nav0002",
"type": "header-menu",
"data": {
"menu": "main-menu"
},
"children": []
}
],
"expectedHeadVersionId": null
}
'{
"publishedAt": "2026-10-15T12:02:44.000Z",
"pageRevisions": {
"clz8q1m2n0002pg01home0001": "2026-10-15T12:02:44.000Z",
"clz8q1m2n0003pg01prod0002": "2026-10-15T12:02:44.000Z"
},
"sectionId": "clz9g7x1k0001gs0secn0001",
"projectId": "clz8p2k0q0001ab12cd34ef56",
"versionId": "clzb3v0d10007gsv0ver0007",
"rootItemId": "clz9h1a2b0003gs01hdr0001",
"pageIds": [
"clz8q1m2n0002pg01home0001",
"clz8q1m2n0003pg01prod0002"
]
}{
"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>"
}{
"object": "error",
"code": "STALE_PAGE",
"message": "GLOBAL_SECTION_DRAFT_STALE",
"status": 409
}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.
Response
Operation result
The response is of type object.
Was this page helpful?