API reference · Static hosting
Create a link to a site's previews
POST
/v1/orgs/{org}/zones/{zone}/origins/{origin}/previews/linksCreate 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
| Name | In | Type | Required | Notes |
|---|---|---|---|---|
org | path | string | yes | for example "org_01h455vb4pex5vsknk084sn02q" |
zone | path | string | yes | for example "zone_01h455vb4pex5vsknk084sn02q" |
origin | path | string | yes | for example "origin_01h455vb4pex5vsknk084sn02q" |
Idempotency-Key | header | string | no | One 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-assignment | header | string | no | Select 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
| Field | Type | Required | Notes |
|---|---|---|---|
name | string | yes | 1 to 64 characters |
expiresAt | string (date-time) | no | UTC, ISO 8601. |
Response 201
| Field | Type | Required | Notes |
|---|---|---|---|
id | string | yes | for example "plink_01h455vb4pex5vsknk084sn02q" |
name | string | yes | 1 to 64 characters |
createdAt | string (date-time) | yes | UTC, ISO 8601. |
expiresAt | string (date-time) or null | yes | |
expired | boolean | yes | |
token | string | yes | Link token. Shown once, never stored in clear. |