Skip to main content
POST
Publish a preview

Authorizations

Authorization
string
header
required

A gbr_pat_ access token. Scopes are recorded on the token when it is minted.

Headers

Idempotency-Key
string

Retrying with the same key replays the first answer instead of acting again.

Maximum string length: 255

Body

application/json
subdomain
string

2–63 characters of a–z, 0–9 and hyphens. Omit and one is derived from the session.

Response

Publish this session's preview at a public URL.

object
string
required

Always preview. Names the shape, so a value can be identified without knowing which call returned it.

Allowed value: "preview"
subdomain
string
required

The label the site is served under.

url
string
required

The public address. A Gobare origin, never the sandbox provider's.

published_url
string
required

The same address, under the name the session object uses for it. A session carries two — preview.url needs a token, preview.published_url does not — and this call returned only url, so nothing in the shape said which one you were holding. It is the public one; this field says so rather than leaving you to bet on it.

port
integer | null
required

The workspace port being served.