hosting

PUT /v1/sites/{siteId}/turnstile

Switch the Turnstile login check on or off for a site.

All hosting endpoints

All developer docs →

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 \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "enabled": <boolean> }'

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

Answers 202: the request is saved and the change runs as a background job (it creates or deletes the site's widget and writes the site, which takes seconds). Poll the GET while busy. 409 while an earlier change is still running, or when the site cannot carry the check. Audit-logged. Requires sites.view and sites.panel_access.

Parameters

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

Request body

NameTypeRequiredWhat it is
enabledbooleanYes—

Response

NameTypeRequiredWhat it is
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, failed>Yes—
verified_atstringYes—
requested_atstringYes—

Errors this endpoint can return

401 · 403 · 404 · 409 · 422 · 429