Skip to content

Restore a version into the draft

POST/v1/organization/{orgId}/sites/{siteId}/versions/{versionId}/restore

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

Copies a version into the draft so the person can look it over; nothing goes live until it is published. Also at POST /v1/sites/{siteId}/versions/{versionId}/restore.

Request example

Terminal window
curl --request POST \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/sites/{siteId}/versions/{versionId}/restore' \
--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.

  • versionIdstring<uuid>pathrequired

    The version's id from List a Site's versions.

Request body

application/json

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

Responses

200application/json

Restored into the draft; the new revision, the version number and the diff against live.

  • payloadobject
    Show child attributes
    • revisionstring
    • restored_versioninteger
    • diffSiteDiff
      Show child attributes
      • changedboolean
      • pagesobject[]
      • blocksobject[]
      • settingsobject[]
        Show child attributes
        • keystring
        • labelstring
      • summarystring[]

        One plain sentence per change, for the person to read.

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.

404

No such version on this Site.

409

The Site changed since baseRevision (code: SITE_DRAFT_STALE).

Response examples

{
"payload": {
"revision": "<string>",
"restored_version": 123,
"diff": {
"changed": true,
"pages": [
{}
],
"blocks": [
{}
],
"settings": [
{
"key": "<string>",
"label": "<string>"
}
],
"summary": [
"<string>"
]
}
}
}