---
title: "Rename, delete, or draft and publish a global section"
method: POST
path: "/projects/{projectId}/global-sections/{sectionId}"
tags: ["Global sections"]
---

# Rename, delete, or draft and publish a global section

`POST /projects/{projectId}/global-sections/{sectionId}`

## Request

- Base URL: `https://studio.weaverse.io/api/v1/content`
- URL: `https://studio.weaverse.io/api/v1/content/projects/{projectId}/global-sections/{sectionId}`
- Auth: HTTP bearer

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`

## Request body

- union
  - object
    - `op` 'rename', required
    - `name` string, required
  - object
    - `op` 'delete', required
    - `confirm` string, required
  - object
    - `op` 'save-draft', required
    - `items` DraftItem[], required
      - `id` string, required
      - `type` string
      - `data` object
      - `children` object[]
        - `id` string, required
    - `expectedHeadVersionId` string, nullable, required
  - object
    - `op` 'discard-draft', required
    - `versionId` string, required
  - object
    - `op` 'publish-draft', required
    - `versionId` string, required

## Response `200`

Operation result

- object

## Other responses

- `401`: Missing or invalid credentials
- `403`: Foreign project or missing scope (INSUFFICIENT_SCOPE)
- `404`: Not found (never discloses other tenants)
- `409`: STALE_PAGE — draft head moved

---

[API](https://skmtc.dev/weaverse/apis/weaverse-content-api.md) - [All operations](https://skmtc.dev/weaverse/apis/weaverse-content-api/llms.txt) - [OpenAPI document](https://skmtc.dev/weaverse/apis/weaverse-content-api/revisions/d189794169bb?raw)
