Drafts and publishing

Discard a page draft

Discards the page's current draft head. Live content stays as it is, and the draft's version row is kept in history; only the head pointer is removed. The next GET returns live content again.

Fence. Send expectedHeadVersionId with the headVersionId from GET. The discard is an exact compare-and-set:

  • If another save replaced the head since your read, the response is 409 STALE_PAGE and nothing is discarded.
  • Only an active (unscheduled) draft can be discarded. A scheduled draft, an unknown version or a page without a draft returns 404 PAGE_NOT_FOUND. Cancel the schedule with DELETE /versions/{versionId} first.

Required scope: content:write

delete/projects/{projectId}/page-drafts/{pageId}

Request

  • Base URL
    https://studio.weaverse.io/api/v1/content
  • Auth
    HTTP bearer

Request body

expectedHeadVersionIdstring required

The headVersionId of the draft being discarded, exactly as GET returned it. The discard is refused when the draft head has moved.

Response

Discarded

object required

Changes

No recorded changes to this operation across all 1 revision of this API.