Docs

API reference · Static hosting

Create a link to a site's previews

POST/v1/orgs/{org}/zones/{zone}/origins/{origin}/previews/links

Create a link to a site's previews. The token is returned once

Permission
hosting.previews.manage
Budget
60 requests in 60 s per organization, shared as hosting.changes
Audit log
hosting.preview_link.create
Operation
hosting.previews.links.create

Parameters

NameInTypeRequiredNotes
orgpathstringyesfor example "org_01h455vb4pex5vsknk084sn02q"
zonepathstringyesfor example "zone_01h455vb4pex5vsknk084sn02q"
originpathstringyesfor example "origin_01h455vb4pex5vsknk084sn02q"
Idempotency-KeyheaderstringnoOne key per intended mutation. A retry with the key never executes twice; its response carries a secret and is not replayed: a duplicate answers 409 idempotency_outcome_committed. For example "01h455vb4pex5vsknk084sn02q"
x-obhut-management-assignmentheaderstringnoSelect one staff assignment. Direct membership remains the default. Bound API tokens use their stored source and ignore this selector. For example "masg_01h455vb4pex5vsknk084sn02q"

Request body

FieldTypeRequiredNotes
namestringyes1 to 64 characters
expiresAtstring (date-time)noUTC, ISO 8601.

Response 201

FieldTypeRequiredNotes
idstringyesfor example "plink_01h455vb4pex5vsknk084sn02q"
namestringyes1 to 64 characters
createdAtstring (date-time)yesUTC, ISO 8601.
expiresAtstring (date-time) or nullyes
expiredbooleanyes
tokenstringyesLink token. Shown once, never stored in clear.