Public APIAPI ReferencePurges

Invalidate an app's cache.

Beta API

The /v1 API contract may change, including breaking changes without compatibility aliases.

POST/v1/apps/{appId}/purges

This route accepts email-verified users or a dedicated Purge Bearer valid for the app and a ready deployment. kind must be one of url, path, prefix, glob, pattern, tag, app, or host, and wait defaults to true. mode is invalidate (default) or delete and applies only to the response cache. host is specified through value and invalidates only the response cache. tag uses either the existing value field or a tags array (1–16 entries); after trimming, each tag is limited to 256 UTF-8 bytes and 256 characters, and NUL/CR/LF are prohibited. Supports Idempotency-Key; when wait is true, waits for the Edge ACK of the last response-cache event. Each request accepts one URL selector (up to 2048 bytes), with at most 1000 active URLs per app. URL purges are limited to 120 per minute per app, and app purges using a deployment Bearer are limited to 6 per minute per app.

Authorization

bearerAuth
AuthorizationBearer <token>

Use an access token obtained by logging in or exchanging an API token. First exchange an ntro_ API token for an access token through the login server.

In: header

Path Parameters

appId*string

Header Parameters

Idempotency-Key?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/apps/string/purges" \  -H "Content-Type: application/json" \  -d '{    "kind": "string"  }'
{  "purge": {    "createdAt": "string",    "id": "string",    "kind": "string",    "mode": "string",    "tags": [      "string"    ],    "value": "string"  },  "status": "string"}