Skip to content

Publish a Site

POST/v1/organization/{orgId}/sites/{siteId}/publish

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

The draft goes live. Only after the person has seen the diff (and a preview) and said OK: send confirmed: true and the revision of the diff they approved; an edit made after their OK answers 409. Called by an AI assistant, it answers 202 with status: needs_approval and a link: a person approves it in Sessionboard, and it runs as them. Every publish is a version you can restore. Also at POST /v1/sites/{siteId}/publish.

Request example

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

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/jsonrequired

  • revisionstringrequired

    The revision of the diff the person approved.

    Max length
    64
  • confirmedbooleanrequired

    true only after the person said OK.

{
"revision": "<string>",
"confirmed": true
}

Responses

200application/json

Published.

  • payloadobject
    Show child attributes
    • publishedboolean
    • versioninteger | null
    • revisionstring
    • urlstring | null

202

Waiting for a person: status: needs_approval, approval_id and url to approve it in Sessionboard.

400

confirmed is not true.

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 draft changed after the approved revision (code: SITE_DRAFT_STALE).

Response examples

{
"payload": {
"published": true,
"version": 123,
"revision": "<string>",
"url": "<string>"
}
}