Turnstile

turnstile

Turnstile

Widgets

turnstile.widgets

Methods

Create A Turnstile Widget -> Envelope<>
post/accounts/{account_id}/challenges/widgets

Lists challenge widgets.

Security

The preferred authorization scheme for interacting with the Cloudflare API. Create a token.

Example: Authorization: Bearer Sn3lZJTBX6kkg7OdcBUAxOO963GEIyGQqnFTOFYY

Parameters
account_id: string

Identifier

direction:
Optional

Direction to order widgets.

"asc"
"desc"
order:
Optional

Field to order widgets by.

"id"
"sitekey"
"name"
"created_on"
"modified_on"
page: number
Optional

Page number of paginated results.

per_page: number
Optional

Number of items per page.

Response fields
errors: Array<>
messages: Array<>
success: boolean

Whether the API call was successful

result:
Optional

A Turnstile widget's detailed configuration

result_info: { count, page, per_page, 1 more... }
Optional
Request example
200Example
Delete A Turnstile Widget -> Envelope<>
delete/accounts/{account_id}/challenges/widgets/{sitekey}

Destroy a Turnstile Widget.

Turnstile Widget Details -> Envelope<>
get/accounts/{account_id}/challenges/widgets/{sitekey}

Show a single challenge widget configuration.

List Turnstile Widgets -> V4PagePaginationArray<{ bot_fight_mode, clearance_level, created_on, 8 more... }>
get/accounts/{account_id}/challenges/widgets

Lists all turnstile widgets of an account.

Rotate Secret For A Turnstile Widget -> Envelope<>
post/accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret

Generate a new secret key for this widget. If invalidate_immediately is set to false, the previous secret remains valid for 2 hours.

Note that secrets cannot be rotated again during the grace period.

Update A Turnstile Widget -> Envelope<>
put/accounts/{account_id}/challenges/widgets/{sitekey}

Update the configuration of a widget.

Domain types

Widget = { bot_fight_mode, clearance_level, created_on, 9 more... }
WidgetDomain = string