Contents
Purge
Remove cached content from every edge location, by path or all at once. Purges run asynchronously.
Examples marked as generated are built from the schema with synthetic values.
- GETList purge requests
/api/v2/sites/{site_id}/purge-requests - POSTPurge cached content
/api/v2/sites/{site_id}/purge-requests - GETGet a purge request
/api/v2/sites/{site_id}/purge-requests/{purge_id}
GET
/api/v2/sites/{site_id}/purge-requestsList purge requests
Returns the purge history of a site, one page at a time.
- Authentication
- API token or portal session
- Required permission
sites.read
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| site_id | Path | string | Yes |
|
| limit | Query | integer | No |
|
| cursor | Query | string | No |
|
Responses
200OKapplication/json
Fields (15)
Responses listPurgeRequests 200 Field Type Required Rules data array<object> Yes data[].id string Yes data[].kind string Yes - One of: all, url
data[].paths array<string> Yes data[].status string Yes - One of: queued, in_progress, completed, partial, failed, cancelled
data[].pops object Yes data[].pops.total integer Yes data[].pops.done integer Yes data[].pops.failed integer Yes data[].created_at string Yes - Format: date-time
data[].started_at string Yes - Format: date-time
- Can be null
data[].completed_at string Yes - Format: date-time
- Can be null
pagination object Yes pagination.next_cursor string Yes - Can be null
pagination.has_more boolean Yes Example (generated from the schema) { "data": [ { "id": "id_example", "kind": "all", "paths": [ "string" ], "status": "queued", "pops": { "total": 1, "done": 1, "failed": 1 }, "created_at": "2026-01-15T10:00:00Z", "started_at": "2026-01-15T10:00:00Z", "completed_at": "2026-01-15T10:00:00Z" } ], "pagination": { "next_cursor": "string", "has_more": false } }401Unauthorizedapplication/problem+json
Headers: WWW-Authenticate
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Authentication required", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }404Not foundapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/not_found", "title": "Not found", "status": 404, "code": "not_found", "request_id": "req_01EXAMPLE00000000000000000" }
curl 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/purge-requests' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"POST
/api/v2/sites/{site_id}/purge-requestsPurge cached content
Removes content from every edge location: everything (kind all) or a list of up to 500 paths (kind url). The purge runs asynchronously: the answer is 202 with a purge request you can follow.
- Authentication
- API token or portal session
- Required permission
cache.purge
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| site_id | Path | string | Yes |
|
| Idempotency-Key | Header | string | No |
|
Request body
Content types: application/json
| Field | Type | Required | Rules |
|---|---|---|---|
| kind | string | Yes |
|
| paths | array<string> | No |
|
{
"kind": "all",
"paths": [
"/"
]
}Responses
202Acceptedapplication/json
Headers: Location
Fields (11)
Responses createPurgeRequest 202 Field Type Required Rules id string Yes kind string Yes - One of: all, url
paths array<string> Yes status string Yes - One of: queued, in_progress, completed, partial, failed, cancelled
pops object Yes pops.total integer Yes pops.done integer Yes pops.failed integer Yes created_at string Yes - Format: date-time
started_at string Yes - Format: date-time
- Can be null
completed_at string Yes - Format: date-time
- Can be null
Example (generated from the schema) { "id": "id_example", "kind": "all", "paths": [ "string" ], "status": "queued", "pops": { "total": 1, "done": 1, "failed": 1 }, "created_at": "2026-01-15T10:00:00Z", "started_at": "2026-01-15T10:00:00Z", "completed_at": "2026-01-15T10:00:00Z" }401Unauthorizedapplication/problem+json
Headers: WWW-Authenticate
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Authentication required", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }403Forbiddenapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/insufficient_scope", "title": "Insufficient permissions", "status": 403, "code": "insufficient_scope", "request_id": "req_01EXAMPLE00000000000000000" }404Not foundapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/not_found", "title": "Not found", "status": 404, "code": "not_found", "request_id": "req_01EXAMPLE00000000000000000" }409Conflictapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/alias_in_use", "title": "Site name already in use", "status": 409, "code": "alias_in_use", "request_id": "req_01EXAMPLE00000000000000000" }422Unprocessable contentapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/validation_failed", "title": "Validation failed", "status": 422, "code": "validation_failed", "request_id": "req_01EXAMPLE00000000000000000" }
curl -X POST 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/purge-requests' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{"kind":"all","paths":["/"]}'GET
/api/v2/sites/{site_id}/purge-requests/{purge_id}Get a purge request
Returns the status of a purge and how many edge locations have completed it.
- Authentication
- API token or portal session
- Required permission
sites.read
Parameters
| Name | In | Type | Required | Rules |
|---|---|---|---|---|
| site_id | Path | string | Yes |
|
| purge_id | Path | string | Yes |
Responses
200OKapplication/json
Fields (11)
Responses getPurgeRequest 200 Field Type Required Rules id string Yes kind string Yes - One of: all, url
paths array<string> Yes status string Yes - One of: queued, in_progress, completed, partial, failed, cancelled
pops object Yes pops.total integer Yes pops.done integer Yes pops.failed integer Yes created_at string Yes - Format: date-time
started_at string Yes - Format: date-time
- Can be null
completed_at string Yes - Format: date-time
- Can be null
Example (generated from the schema) { "id": "id_example", "kind": "all", "paths": [ "string" ], "status": "queued", "pops": { "total": 1, "done": 1, "failed": 1 }, "created_at": "2026-01-15T10:00:00Z", "started_at": "2026-01-15T10:00:00Z", "completed_at": "2026-01-15T10:00:00Z" }401Unauthorizedapplication/problem+json
Headers: WWW-Authenticate
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/unauthenticated", "title": "Authentication required", "status": 401, "code": "unauthenticated", "request_id": "req_01EXAMPLE00000000000000000" }404Not foundapplication/problem+json
Error codes:
Problem details body
Example { "type": "https://www.cdnify.lat/docs/errors/not_found", "title": "Not found", "status": 404, "code": "not_found", "request_id": "req_01EXAMPLE00000000000000000" }
curl 'https://api.cdnify.lat/api/v2/sites/site_0a1b2c3/purge-requests/purge_example' \
-H "Authorization: Bearer $CDNIFY_API_TOKEN"