Cache Purge

The purge endpoints clear cached content from the Skip2 edge. They accept the HTTP PURGE method (and POST as a convenience). Every pattern is checked against the hosts you own, so a key can only purge your own sites.

Endpoints

Method

Path

Description

PURGE / POST

/sites/{site_id}/purge

Purge a single site

PURGE / POST

/purge

Purge by pattern across sites

Patterns

A pattern is a host and optional path with * wildcards, for example example.com/blog/* or *example.com*. A scheme (https://) is stripped automatically if present. The host portion of every pattern must belong to one of your sites or the request is rejected with HTTP 403.

Purge an entire site

curl -X PURGE https://api.skip2.net/v1/sites/1000/purge \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"all": true}'

Purge specific patterns for a site

curl -X PURGE https://api.skip2.net/v1/sites/1000/purge \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"patterns": ["example.com/blog/*", "example.com/assets/*"]}'

Purge across multiple sites

curl -X PURGE https://api.skip2.net/v1/purge \
  -H "Authorization: Bearer $SKIP2_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"pattern": "example.com/blog/*"}'

Response

Each submitted pattern is reported with its result:

{
  "success": true,
  "data": {
    "results": [
      {"pattern": "example.com/blog/*", "submitted": true, "detail": null}
    ]
  }
}

If every pattern fails the response is HTTP 502 with service_unavailable and the per-pattern details in error.details.results.

Notes

  • Provide exactly one of all (site endpoint only), pattern, or patterns.

  • Purges may be temporarily disabled during maintenance, returning service_unavailable (HTTP 503).