curl -X POST "https://api.cloudflare.com/client/v4/zones/$ZONE_ID/purge_cache" -H 'X-Auth-Email: admin@example.com' -H 'X-Auth-Key: cfk_8f3a2b9c1d4e5f6a7b8c9d0e1f2a3b4c'
Authenticate with a Global API Key
Legacy auth for scripts that predates API tokens: X-Auth-Email plus X-Auth-Key instead of a Bearer token. Global API Keys, which start with cfk_, carry full account access, so guard them like passwords and prefer scoped tokens. Sending a cfk_ key as a Bearer token returns an auth error.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.