Site preview

Fetch an up-to-date preview of your site before publishing.

Quickly generate a preview of how your site’s content and layout will appear once published, allowing for final checks and refinement prior to going live.

Get a site preview URL

get

Generate a URL to preview the published content of a site. The URL will be valid for 1 hour.

Authorizations
Path parameters
organizationIdstringrequired

The unique id of the organization

siteIdstringrequired

The unique id of the site

Query parameters
siteSpacestringoptional

ID of the site-space to preview. If not provided, the default site-space will be used.

claimsstringoptional

Rison encoded string of attributes/assertions about the visitor for which we want to preview the site.

Responses
curl -L \
  --url 'https://api.gitbook.com/v1/orgs/{organizationId}/sites/{siteId}/publishing/preview' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN'
{
  "url": "https://example.com"
}

Was this helpful?