Generate a temporary preview URL for a site's published content
Generates a time-limited URL (valid for 1 hour) to preview how a site will look when published. Use this to verify changes before making the site publicly accessible.
A unique entity identifier
^[a-zA-Z0-9_-]+$The unique id of the site
ID of the site-space to preview. If not provided, the default site-space will be used.
Rison encoded string of attributes/assertions about the visitor for which we want to preview the site.
ISO 3166-1 alpha-2 code of the country of the visitor for which we want to preview the site. It is matched against the regions of the site adaptive schema to resolve visitor.region.
Whether the visitor for which we want to preview the site is signed in, as visitor.isAuthenticated reports it. Claims outside unsigned already imply a signed-in visitor; set this to preview one that is signed in while carrying no claim.
Whether to include draft content in the preview. Defaults to true
trueTarget URL of the preview. If not provided, the default site preview URL will be used.
OK
Bad Request
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"
}Last updated
Was this helpful?