Cache

Invalidate cache by tenant

Invalidate Redis cache for /api/v3/keys by tenant and platform

POST
/api/v2/cache/invalidate/by-tenant

Authorization

BearerAuthObject
AuthorizationBearer <token>

Machine tokens only: a personal API token or a product robot token (POST /api/v2/products/{uid}/robot-tokens). A session JWT here is 401 — the web app uses the b2t_access cookie.

In: header

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

curl -X POST "https://example.com/api/v2/cache/invalidate/by-tenant" \  -H "Content-Type: application/json" \  -d '{    "tenantId": "01936f1a-5b5a-7000-8000-000000000001",    "platform": "web",    "storyName": "production"  }'
{  "keysDeleted": 12}
{  "message": {    "field": "Error message"  }}
{  "message": {    "error": "Your request was made with invalid credentials."  }}
{  "message": {    "error": "You are not allowed to perform this action."  }}
{  "message": {    "error": "Page not found"  }}