Skip to content

Discard a Site's draft

POST/v1/organization/{orgId}/sites/{siteId}/draft/discard

US Region: https://public-api.sessionboard.com · EU Region: https://public-api-eu.sessionboard.com

Throws away every unpublished change; the draft goes back to what is live. Confirm with the person first. Also at POST /v1/sites/{siteId}/draft/discard.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/sites/{siteId}/draft/discard' \
--header 'x-access-token: <api-token>' \
--header 'Content-Type: application/json' \
--data '{
"baseRevision": "<string>"
}'

Try it

Authorization

Your token stays in this page. It is sent only to the region above and is never saved; it is gone when you leave or reload the page.

Path parameters
Body application/json
POST

Authorizations

  • x-access-tokenstringheader

    Organization API token. Generate from Organization Settings → API Tokens.

  • AuthorizationBearer <token>headeror

    OAuth 2.1 access token. Obtained via the OAuth PKCE flow at /oauth/token.

Send one of these. See Authentication.

Path parameters

  • orgIdstringpathrequired

    Your organization ID. Any other organization returns 404.

  • siteIdstring<uuid>pathrequired

    The Site's id from List Sites.

Request body

application/json

  • baseRevisionstring
    Max length
    64
{
"baseRevision": "<string>"
}

Responses

200application/json

Discarded.

  • payloadobject
    Show child attributes
    • revisionstring
    • discardedboolean

403

  • SCOPE_REQUIRED — the token lacks read:sites (or read:marketing, read:learning, read:awards) for reads, or the matching write: scope for writes.
  • FORBIDDEN — the token's user cannot edit this Site.

409

The Site changed since baseRevision (code: SITE_DRAFT_STALE).

Response examples

{
"payload": {
"revision": "<string>",
"discarded": true
}
}