hosting
GET /v1/sites/{siteId}/origin-key
Where a site's origin-lock key rotation is.
Authentication
Send an API key as a bearer token. The key must carry the sites.view permission; a key without it is refused with 403, not 404.
This endpoint takes no organisation id. Your key already identifies the organisation it belongs to, and the response is scoped to it.
Try it
Replace anything in angle brackets with your own values, and the key placeholder with a key from your dashboard.
curl -X GET https://api.zinndigital.com/v1/sites/{siteId}/origin-key \
-H "Authorization: Bearer zdk_live_…"Signed in? The API console in your dashboard fills in your real organisation id and your own key, and runs the request against the live API so you can see the actual response. Open this endpoint in the API console
Details
The key's generation (0 = the key the site was created with), whether a rotation is running (state staged or overlap), when the last one finished and, during the grace overlap, when the old key stops being accepted. Never the key itself. 404 for a site that is not the caller's or is not on one of our servers. Requires sites.view.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
site_id | string | Yes | — |
generation | integer | Yes | How many rotations have finished. 0 is the key the site was created with. |
state | string<idle, staged, overlap, failed> | Yes | staged - the server is learning the new key; overlap - the platform sends the new key and the old one is still accepted until previous_valid_until; failed - the last… |
rotating | boolean | Yes | True while state is staged or overlap. |
rotated_at | object | Yes | When the platform last switched to a new key. |
previous_valid_until | object | Yes | During overlap, when the old key stops being accepted. |
last_error | string | Yes | Why the last rotation failed, or empty. |
Errors this endpoint can return
401 · 403 · 404 · 429