hosting
PUT /v1/sites/{siteId}/turnstile/keys
Use your own Cloudflare Turnstile keys for a site's login check.
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 PUT https://api.zinndigital.com/v1/sites/{siteId}/turnstile/keys \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "sitekey": <string>, "secret": <string> }'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
Owner 1105#26. Paste the sitekey and secret of a Turnstile widget in YOUR Cloudflare account (its hostnames must include the site's domain). The secret is checked with one Cloudflare siteverify call, kept in Vault and never returned. 422 for keys that are malformed, Cloudflare's test keys, or a secret Cloudflare rejects. When the check is on, the site is switched to your keys by the background job (202; poll the GET) and the platform widget is deleted; when it is off, the keys are saved for when it is switched on (200). 409 while a change is running or for a site that cannot carry the check. Audit-logged. Requires sites.view and sites.panel_access.
Parameters
| Name | Type | Required | What it is |
|---|---|---|---|
siteId (path) | Uuid | Yes | Site ID (UUIDv7). |
Request body
| Name | Type | Required | What it is |
|---|---|---|---|
sitekey | string | Yes | Your widget's sitekey (0x…). |
secret | string | Yes | Your widget's secret key. Checked with Cloudflare, kept in Vault, never returned. |
Response
| Name | Type | Required | What it is |
|---|---|---|---|
key_source | string<platform, own> | Yes | platform: a widget we create. own: the customer's own keys (PUT /keys). |
sitekey | string | Yes | The PUBLIC sitekey the site uses now. Never the secret. |
own_sitekey | string | Yes | The customer's own PUBLIC sitekey, when set. The secret is never returned. |
places | string<login, register, lostpassword, comments, cf7, wpforms, elementor, everest, fluent, formidable, forminator, happyforms, kadence, mc4wp, metform, ninja, otter, spectra>[] | Yes | The forms the check protects. |
all_places | string[] | Yes | Every form the check can protect (the picker's choices). |
can_rotate | boolean | Yes | true for a platform widget that exists (POST /rotate). |
rotated_at | string | Yes | — |
available | boolean | Yes | — |
enabled | boolean | Yes | What was last asked for. |
status | string<off, pending, active, failed> | Yes | — |
step | string<queued, widget, site, idle> | Yes | — |
busy | boolean | Yes | — |
stale | boolean | Yes | — |
error_code | string<, readonly, no_widget, not_supported, own_keys_missing, failed> | Yes | — |
verified_at | string | Yes | — |
requested_at | string | Yes | — |
Errors this endpoint can return
401 · 403 · 404 · 409 · 422 · 429