CorefinityCorefinityDocs
Open the Control PanelControl Panel
Cloudflare · 7 of 10

Purge a site's Cloudflare cache

Purges the whole zone, or up to 30 addresses on the site's own domains. The purge is sent to Cloudflare before the answer: the command in the answer says whether it succeeded or failed, and stays readable at GET /corestack/commands/{command}. When Varnish is on for the site its cache is purged first, unless varnish_first is false.

POST/api/corestack/sites/{site}/cloudflare/purge

Path parameters

siteintegerRequired

The id of a site row. A website's production site and each of its environments has its own id. Digits only. At least 1.

Body

everythingboolean
urlsarray of strings

Addresses starting http:// or https:// on one of the site's own domains. Up to 30 items.

varnish_firstboolean

Whether to purge the site's Varnish cache first, when Varnish is on. Left out, it does.

Returns

202 The purge was sent. command.status is succeeded, with what was purged in result, or failed, with Cloudflare's refusal in error.

Fields of the 202 answer
commandobjectRequired

The purge as a command. Read it again with GET /corestack/commands/{command}.

Fields
blocked_until_verifiedboolean or null
duration_msinteger or null
errorstring or null
exit_codeinteger or null
finished_atstring or null

Format: date-time.

idintegerRequired

At least 1.

inputobject

What was asked for: everything, or the urls.

Fields
everythingboolean
urlsarray of strings
kindstringRequired
labelstringRequired
operation_idinteger or null
output_excerptstring or null
queued_atstring or null

Format: date-time.

requested_byobject or any or null

Who asked for the purge. Null when that person's account no longer exists.

resultany

What the purge did, once it has finished.

siteobjectRequired

The site.

Fields
domainstringRequired
idintegerRequired

At least 1.

started_atstring or null

Format: date-time.

statusstringRequired
queuedrunningsucceededfailedtimed_outlost
status_labelstringRequired

If it is refused

StatusReasonWhat to do
401noneSend a valid token as Authorization: Bearer <token>.
403company_unavailableYour company is unavailable.
403scope_requiredUse a token with the scope named in scope.
403two_factor_requiredTurn on two-factor on your account, then send again.
404feature_offThis feature is not on for your organisation yet.
409no_zoneThe site's domain is not in a connected Cloudflare zone, or Cloudflare is off for the site. Connect the Cloudflare account that holds the zone.
422invalidFix the field named in field; errors says why.
429rate_limitedWait for the seconds in Retry-After.
503switched_offCorefinity has switched this action off for the moment. Try again later.

Reasons are listed by name in Errors and refusals.

The same task elsewhere

curl -X POST https://manage.corefinity.com/api/corestack/sites/1042/cloudflare/purge \
  -H "Authorization: Bearer $COREFINITY_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
    "everything": true
  }'
{
  "command": {
    "blocked_until_verified": false,
    "duration_ms": 547,
    "error": "Cloudflare did not answer. Try again in a minute.",
    "exit_code": null,
    "finished_at": "2026-11-06T08:07:03Z",
    "id": 2036,
    "input": {
      "everything": true
    },
    "kind": "cloudflare_purge",
    "label": "Purge Cloudflare cache",
    "operation_id": null,
    "output_excerpt": null,
    "queued_at": "2026-11-06T08:07:02Z",
    "requested_by": {
      "id": 5021,
      "name": "Eleanor Finch"
    },
    "result": null,
    "site": {
      "domain": "harbourandfinch.example.com",
      "id": 1042
    },
    "started_at": "2026-11-06T08:07:02Z",
    "status": "failed",
    "status_label": "Failed"
  }
}
Try it

Try it is off for this endpointIt deletes data that cannot be brought back. Copy the request and run it yourself when you are sure.

Was this helpful?
Open in ClaudeOpen in ChatGPT