Edge Caching

Edge caching saves your site/page cache to Cloudflare's global network of data centers. With the edge-caching endpoint, you can perform actions like clearing edge caching for your sites.

Most of these edge caching endpoints will trigger longer tasks (from a few seconds to around a minute) on your environments. This is why they provide 202 Accepted response, with an operation_id in the body. To check the progress, you can use the /operations endpoint.

Clear Site Edge Cache

SecuritybearerAuth
Request
Request Body schema: application/json
required
environment_id
required
string
clear_subdirectories
boolean
Default: false
url
string
Responses
202

Clearing site edge cache in progress

401

No or invalid API key provided to the request

500

Error occurred while trying to clear cache

post/sites/edge-caching/clear
Request samples
application/json
{
  • "environment_id": "54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "clear_subdirectories": true,
}
Response samples
application/json
{
  • "operation_id": "edgeCache:clear-54fb80af-576c-4fdc-ba4f-b596c83f15a1",
  • "message": "Clearing site edge cache in progress",
  • "status": 202
}