Global sections
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): saves items (1-500 items, the full item shape; a malformed graph returns 400) as the section's shared draft. expectedHeadVersionId must name the current draft head (null when there is none); if another save moved the head, the call returns 409 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 by versionId. Live content is untouched.
- publish-draft (content:publish): makes draft versionId live on every page that renders the section, advances those pages' revisions and clears the draft head. pageIds lists the pages it advanced. Retrying a publish that already committed returns the stored receipt without rewriting content. 409 STALE_PAGE means 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, plus confirm equal to the sectionId): 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
post/projects/{projectId}/global-sections/{sectionId}
Request
- Base URLhttps://studio.weaverse.io/api/v1/content
- AuthHTTP bearer
Request body
Response
Operation result
object required
Changes
No recorded changes to this operation across all 1 revision of this API.