Cloudflare
Cloud API tokenManage zones, DNS, workers, R2 and the rest of the Cloudflare API from any Windmill script, flow or app.
Set up in 3 steps
Create an API token
In the Cloudflare dashboard, open My Profile then API Tokens. Create a token, granting only the permissions and zones your scripts need, and copy it.
Add the resource in Windmill
Open Resources, add a resource of type cloudflare, and paste the token. account_id is there for scripts that need it in a path; leave email and key empty.
Run your first script
Fork any script below and list your zones. There are over a thousand here, so search by the verb you need.
Scripts
Building blocks, if none of the projects above fit. Fork one, run it, or call it as a step inside your own flow.
Create a Certificate
Patch DNS Record
List Certificates
Purge All Files
Create DNS Record
Update Zone Security Level
Import DNS Records
List DNS Records
Revoke Certificate
Change Development Mode
Delete DNS Record
Export DNS Records
Create Zone
Get Attack Bitrate Summary
Update Cron Triggers
List virtual networks
Update priority of a firewall rule
Update Queue
Delete Hostname Client Certificate
Get IP address
Get a firewall rule
Get Always Use HTTPS setting
Create a list
Execute AI model
Update Prefix Description
Create a new output, connected to a live input
Get Access authentication logs
Get ASN Subnets
Set Account Custom Nameserver Related Zone Metadata
Create Custom Hostname
Resource type
cloudflare — the shape of the credential every script on this page expects.
| Field | Type | Required | What it is |
|---|---|---|---|
| token | string | Yes | |
| account_id | string | No | |
| string | No | deprecated | |
| key | string | No | deprecated |
Questions
What are the email and key fields?
The legacy Global API Key pair, kept for older scripts and marked deprecated. It authenticates as your whole account with no scoping — use an API token instead.
A call returns 403 on one zone but works on another
API tokens are scoped per zone and per permission. Edit the token in Cloudflare to include the zone, rather than widening it to everything.
Is my token stored on the hub?
Never. It lives only in your own Windmill workspace, encrypted at rest.