Cloudflare API
Set up API access for Cloudflare, enabling management of DNS, CDN, Workers, and security settings programmatically.
getapi cloudflare
Prerequisites
- A Cloudflare account
Credentials
| Variable | Description | Sensitive |
|---|---|---|
CLOUDFLARE_API_TOKEN |
Scoped API token for Cloudflare API access | Secret |
Setup Steps
- 1 Info
- 2 Open URL
- 3 Info
- 4 Confirm
- 5 Input
- 6 Validate
Things to Know
- API tokens are only shown once when created. If you lose it, you'll need to create a new one.
- Always use scoped API tokens instead of the Global API Key. Tokens can be limited to specific zones and permissions.
- Cloudflare's free plan includes CDN, DNS, DDoS protection, and basic WAF rules.
- The API has a rate limit of 1,200 requests per 5 minutes. Batch operations where possible.
- Token permissions are additive — start with minimal permissions and add more as needed.