Initialize the Turnstile resource
Widget management
Manage Turnstile widgets for your applications.Create widget
Create a new Turnstile widget for bot protection.Account identifier
List of domains where the widget will work. Accepts hostnames or IPv4/IPv6 addresses. The widget will work on these domains and their subdomains.
Widget mode. Options:
non-interactive- No user interaction requiredinvisible- Invisible challenge, minimal user interactionmanaged- Adaptive challenge based on risk
Human readable widget name. This should be a meaningful string to identify your widget and where it is used.
When set to true, Cloudflare issues computationally expensive challenges in response to malicious bots (Enterprise only).
If Turnstile is embedded on a Cloudflare site, this determines the challenge clearance level. Options:
no_clearance, jschallenge, managed, interactiveReturn the Ephemeral ID in /siteverify (Enterprise only).
Do not show any Cloudflare branding on the widget (Enterprise only).
Region where this widget can be used. Options:
world, china. This cannot be changed after creation.Update widget
Update the configuration of an existing widget.List widgets
List all Turnstile widgets in your account.Direction to order widgets. Options:
asc, descField to order widgets by. Options:
id, sitekey, name, created_on, modified_onPage number of paginated results
Number of items per page
Get widget
Retrieve a single widget configuration by sitekey.Delete widget
Delete a Turnstile widget.Rotate secret
Generate a new secret key for a widget.If set to false, the previous secret will remain valid for two hours. Otherwise, the secret is immediately invalidated and requests using it will be rejected.
Response types
Widget
A Turnstile widget configuration.Widget item identifier tag
Secret key for this widget (only returned on creation and rotation)
Human readable widget name
List of domains where the widget will work
Widget mode:
non-interactive, invisible, or managedWhether bot fight mode is enabled
Challenge clearance level
Whether ephemeral ID is enabled
Whether Cloudflare branding is hidden
Region where widget can be used:
world or chinaWhen the widget was created
When the widget was last modified