Sandboxes

Mint a shareable link to a sandbox preview.

GET /domain returns the bare preview URL, which is useless to anyone who does not already hold the sandbox's preview password — so sharing a protected preview meant sharing that password, which is the same secret for every recipient and can only be withdrawn by rotating it for all of them.

This returns the same URL carrying a short-lived, sandbox-scoped grant. The recipient's browser exchanges it for the ordinary preview cookie and lands on path. The grant never reaches the sandbox, so preview application code cannot read it and re-share it.

Anyone holding the returned URL can view the preview until it expires; there is no per-link revocation short of rotating the preview password.

post/v1/sandboxes/{id}/preview-link

Request

  • Base URL: /api (relative, and the document was published on a file host, not at the API’s origin)
  • URL: /api/v1/sandboxes/{id}/preview-link
  • Auth: HTTP bearer

Path parameters

idstring required

Request body

pathstring nullable

Path the recipient lands on. Must be same-origin (start with a single /); anything else is replaced with / so a share link can never be turned into an open redirect.

portinteger required

Port inside the sandbox the preview serves on.

ttl_secondsinteger nullable

How long the link stays usable, in seconds. Clamped to 24 hours. Defaults to one hour — long enough to send to a reviewer, short enough that a link pasted in a ticket does not stay live indefinitely.

Response

Shareable preview link

expires_atinteger required

Unix seconds after which the link stops working.

urlstring required

The full link. Its fragment contains the grant and must be treated as a credential; URL fragments are not sent to servers or in Referer headers.

Changes

No recorded changes to this operation across all 54 revisions of this API.