Skip to content

Instantly share code, notes, and snippets.

@DavidEredics
Created August 17, 2021 15:01
Show Gist options
  • Save DavidEredics/d3730e544b15ab6592f2bc1b6137efc5 to your computer and use it in GitHub Desktop.
Save DavidEredics/d3730e544b15ab6592f2bc1b6137efc5 to your computer and use it in GitHub Desktop.
Cloudflare API Purge Files by URL example
curl -X POST "https://api.cloudflare.com/client/v4/zones/[zone_identifier]/purge_cache" \
-H "Authorization: Bearer [api_token]" \
-H "Content-Type: application/json" \
--data '{"files":["https://example.com/data.json","https://www.example.com/favicon.ico"]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment