hosting

POST /v1/sites/{siteId}/turnstile/rotate

Give a site's platform Turnstile widget a new secret key.

All hosting endpoints

All developer docs →

Zinn®, our Viking, hammering at his anvil beside an API endpoint sending events to several listeners.

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 POST https://api.zinndigital.com/v1/sites/{siteId}/turnstile/rotate \
  -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

V1's turnstile_rotate. The background job asks Cloudflare for a new secret (the old one stays valid for two hours, so a visitor mid-login is not refused), writes it to the site and reads it back (202; poll the GET). 409 for a site on your own keys (rotate those in your Cloudflare account), with no widget yet, or while a change is running. Audit-logged. Requires sites.view and sites.panel_access.

Parameters

NameTypeRequiredWhat it is
siteId (path)UuidYesSite ID (UUIDv7).

Response

NameTypeRequiredWhat it is
key_sourcestring<platform, own>Yesplatform: a widget we create. own: the customer's own keys (PUT /keys).
sitekeystringYesThe PUBLIC sitekey the site uses now. Never the secret.
own_sitekeystringYesThe customer's own PUBLIC sitekey, when set. The secret is never returned.
placesstring<login, register, lostpassword, comments, cf7, wpforms, elementor, everest, fluent, formidable, forminator, happyforms, kadence, mc4wp, metform, ninja, otter, spectra>[]YesThe forms the check protects.
all_placesstring[]YesEvery form the check can protect (the picker's choices).
can_rotatebooleanYestrue for a platform widget that exists (POST /rotate).
rotated_atstringYes—
availablebooleanYes—
enabledbooleanYesWhat was last asked for.
statusstring<off, pending, active, failed>Yes—
stepstring<queued, widget, site, idle>Yes—
busybooleanYes—
stalebooleanYes—
error_codestring<, readonly, no_widget, not_supported, own_keys_missing, failed>Yes—
verified_atstringYes—
requested_atstringYes—

Errors this endpoint can return

401 · 403 · 404 · 409 · 429