Cloudflare · Capability

Cloudflare Turnstile API — Widgets

Cloudflare Turnstile API — Widgets. 6 operations. Lead operation: Cloudflare List Turnstile Widgets. Self-contained Naftiko capability covering one Cloudflare business surface.

Run with Naftiko CloudflareWidgets

What You Can Do

GET
Listturnstilewidgets — Cloudflare List Turnstile Widgets
/v1/accounts/{account-id}/challenges/widgets
POST
Createturnstilewidget — Cloudflare Create Turnstile Widget
/v1/accounts/{account-id}/challenges/widgets
GET
Getturnstilewidget — Cloudflare Get Turnstile Widget
/v1/accounts/{account-id}/challenges/widgets/{sitekey}
PUT
Updateturnstilewidget — Cloudflare Update Turnstile Widget
/v1/accounts/{account-id}/challenges/widgets/{sitekey}
DELETE
Deleteturnstilewidget — Cloudflare Delete Turnstile Widget
/v1/accounts/{account-id}/challenges/widgets/{sitekey}
POST
Rotateturnstilesecret — Cloudflare Rotate Widget Secret
/v1/accounts/{account-id}/challenges/widgets/{sitekey}/rotate-secret

MCP Tools

cloudflare-list-turnstile-widgets

Cloudflare List Turnstile Widgets

read-only idempotent
cloudflare-create-turnstile-widget

Cloudflare Create Turnstile Widget

cloudflare-get-turnstile-widget

Cloudflare Get Turnstile Widget

read-only idempotent
cloudflare-update-turnstile-widget

Cloudflare Update Turnstile Widget

idempotent
cloudflare-delete-turnstile-widget

Cloudflare Delete Turnstile Widget

idempotent
cloudflare-rotate-widget-secret

Cloudflare Rotate Widget Secret

read-only

Capability Spec

turnstile-widgets.yaml Raw ↑
naftiko: 1.0.0-alpha2
info:
  label: Cloudflare Turnstile API — Widgets
  description: 'Cloudflare Turnstile API — Widgets. 6 operations. Lead operation: Cloudflare List Turnstile Widgets. Self-contained
    Naftiko capability covering one Cloudflare business surface.'
  tags:
  - Cloudflare
  - Widgets
  created: '2026-05-19'
  modified: '2026-05-19'
binds:
- namespace: env
  keys:
    CLOUDFLARE_API_KEY: CLOUDFLARE_API_KEY
capability:
  consumes:
  - type: http
    namespace: turnstile-widgets
    baseUri: https://api.cloudflare.com/client/v4
    description: Cloudflare Turnstile API — Widgets business capability. Self-contained, no shared references.
    resources:
    - name: accounts-account_id-challenges-widgets
      path: /accounts/{account_id}/challenges/widgets
      operations:
      - name: listturnstilewidgets
        method: GET
        description: Cloudflare List Turnstile Widgets
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: createturnstilewidget
        method: POST
        description: Cloudflare Create Turnstile Widget
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
    - name: accounts-account_id-challenges-widgets-sitekey
      path: /accounts/{account_id}/challenges/widgets/{sitekey}
      operations:
      - name: getturnstilewidget
        method: GET
        description: Cloudflare Get Turnstile Widget
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
      - name: updateturnstilewidget
        method: PUT
        description: Cloudflare Update Turnstile Widget
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
        inputParameters:
        - name: body
          in: body
          type: object
          description: Request body (JSON).
          required: true
      - name: deleteturnstilewidget
        method: DELETE
        description: Cloudflare Delete Turnstile Widget
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    - name: accounts-account_id-challenges-widgets-sitekey-rotate_secret
      path: /accounts/{account_id}/challenges/widgets/{sitekey}/rotate_secret
      operations:
      - name: rotateturnstilesecret
        method: POST
        description: Cloudflare Rotate Widget Secret
        outputRawFormat: json
        outputParameters:
        - name: result
          type: object
          value: $.
    authentication:
      type: bearer
      token: '{{env.CLOUDFLARE_API_KEY}}'
  exposes:
  - type: rest
    namespace: turnstile-widgets-rest
    port: 8080
    description: REST adapter for Cloudflare Turnstile API — Widgets. One Spectral-compliant resource per consumed operation,
      prefixed with /v1.
    resources:
    - path: /v1/accounts/{account-id}/challenges/widgets
      name: accounts-account-id-challenges-widgets
      description: REST surface for accounts-account_id-challenges-widgets.
      operations:
      - method: GET
        name: listturnstilewidgets
        description: Cloudflare List Turnstile Widgets
        call: turnstile-widgets.listturnstilewidgets
        outputParameters:
        - type: object
          mapping: $.
      - method: POST
        name: createturnstilewidget
        description: Cloudflare Create Turnstile Widget
        call: turnstile-widgets.createturnstilewidget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/challenges/widgets/{sitekey}
      name: accounts-account-id-challenges-widgets-sitekey
      description: REST surface for accounts-account_id-challenges-widgets-sitekey.
      operations:
      - method: GET
        name: getturnstilewidget
        description: Cloudflare Get Turnstile Widget
        call: turnstile-widgets.getturnstilewidget
        outputParameters:
        - type: object
          mapping: $.
      - method: PUT
        name: updateturnstilewidget
        description: Cloudflare Update Turnstile Widget
        call: turnstile-widgets.updateturnstilewidget
        with:
          body: rest.body
        outputParameters:
        - type: object
          mapping: $.
      - method: DELETE
        name: deleteturnstilewidget
        description: Cloudflare Delete Turnstile Widget
        call: turnstile-widgets.deleteturnstilewidget
        outputParameters:
        - type: object
          mapping: $.
    - path: /v1/accounts/{account-id}/challenges/widgets/{sitekey}/rotate-secret
      name: accounts-account-id-challenges-widgets-sitekey-rotate-secret
      description: REST surface for accounts-account_id-challenges-widgets-sitekey-rotate_secret.
      operations:
      - method: POST
        name: rotateturnstilesecret
        description: Cloudflare Rotate Widget Secret
        call: turnstile-widgets.rotateturnstilesecret
        outputParameters:
        - type: object
          mapping: $.
  - type: mcp
    namespace: turnstile-widgets-mcp
    port: 9090
    transport: http
    description: MCP adapter for Cloudflare Turnstile API — Widgets. One tool per consumed operation, routed inline through
      this capability's consumes block.
    tools:
    - name: cloudflare-list-turnstile-widgets
      description: Cloudflare List Turnstile Widgets
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: turnstile-widgets.listturnstilewidgets
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-create-turnstile-widget
      description: Cloudflare Create Turnstile Widget
      hints:
        readOnly: false
        destructive: false
        idempotent: false
      call: turnstile-widgets.createturnstilewidget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-get-turnstile-widget
      description: Cloudflare Get Turnstile Widget
      hints:
        readOnly: true
        destructive: false
        idempotent: true
      call: turnstile-widgets.getturnstilewidget
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-update-turnstile-widget
      description: Cloudflare Update Turnstile Widget
      hints:
        readOnly: false
        destructive: false
        idempotent: true
      call: turnstile-widgets.updateturnstilewidget
      with:
        body: tools.body
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-delete-turnstile-widget
      description: Cloudflare Delete Turnstile Widget
      hints:
        readOnly: false
        destructive: true
        idempotent: true
      call: turnstile-widgets.deleteturnstilewidget
      outputParameters:
      - type: object
        mapping: $.
    - name: cloudflare-rotate-widget-secret
      description: Cloudflare Rotate Widget Secret
      hints:
        readOnly: true
        destructive: false
        idempotent: false
      call: turnstile-widgets.rotateturnstilesecret
      outputParameters:
      - type: object
        mapping: $.