Skip to content

Preview a Site as a role on a device

GET/v1/organization/{orgId}/sites/{siteId}/preview

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

A short-lived link to the draft as one role sees it on one device, plus a structured description of what that role sees (pages and blocks), for clients that cannot open the link. Roles depend on the product: visitor and invited (Marketing), visitor and learner (Learning), visitor, submitter, evaluator and, on event portals, speaker (Awards). Also at GET /v1/sites/{siteId}/preview.

Request example

Terminal window
curl --request GET \
--url 'https://public-api.sessionboard.com/v1/organization/{orgId}/sites/{siteId}/preview' \
--header 'x-access-token: <api-token>'

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
Query parameters
GET

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.

Query parameters

  • rolestringquery

    One of the Site's roles (default visitor).

  • devicestringquery
    Allowed values
    "desktop", "tablet", "mobile"
  • pagestringquery

    home, a page id, slug or exact title (default home).

Responses

200application/json

OK

  • payloadSitePreview
    Show child attributes
    • rolestring
    • devicestring
    • viewportobject
      Show child attributes
      • widthinteger
      • heightinteger
    • pageobject
      Show child attributes
      • refstring
      • titlestring
      • pathstring
    • preview_urlstring | null

      Opens the draft as this role; expires at expires_at.

    • expires_atstring<date-time>
    • seesobject

      What this role sees, for clients that cannot open the link.

      Show child attributes
      • pagesobject[]
      • blocksobject[]
    • notestring | null

400

A role this Site does not have.

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.

Response examples

{
"payload": {
"role": "<string>",
"device": "<string>",
"viewport": {
"width": 123,
"height": 123
},
"page": {
"ref": "<string>",
"title": "<string>",
"path": "<string>"
},
"preview_url": "<string>",
"expires_at": "2026-01-15T09:30:00Z",
"sees": {
"pages": [
{}
],
"blocks": [
{}
]
},
"note": "<string>"
}
}