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
application/json
objectOptional
get
GET /v1/orgs/{organizationId}/sites/{siteId}/publishing/preview HTTP/1.1
Host: api.gitbook.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "url": "https://example.com"
}

Was this helpful?