Tenant management endpoints for checking workspace status and resetting playground environments.
GET /api/v1/tenant/status
Check tenant status including playground status and quota usage. No authentication required beyond tenant context.
Response
{
"isPlayground": true,
"hasData": true,
"quotaUsed": 1250,
"quotaLimit": 5000,
"quotaExceeded": false
}
| Field | Description |
|---|
isPlayground | Whether the tenant is a playground workspace |
hasData | Whether the tenant has any categories configured |
quotaUsed | Number of decisions used (playground only) |
quotaLimit | Lifetime decision cap (playground only) |
quotaExceeded | Whether the quota has been exceeded |
POST /api/v1/tenant/reset
Reset a playground workspace, deleting all tenant data. Only available for playground tenants. Admin only.
This permanently deletes all data in the tenant. This action cannot be undone.
Request Body
| Field | Type | Required | Description |
|---|
confirm | boolean | Yes | Must be true to proceed |
Example
curl -X POST https://playground.kaireonai.com/api/v1/tenant/reset \
-H "Content-Type: application/json" \
-H "X-Tenant-Id: my-tenant" \
-H "X-User-Role: admin" \
-d '{ "confirm": true }'
Response
{ "message": "Workspace reset successfully. Decision counter is back to 0." }
Error — Non-Playground Tenant
{ "error": "Tenant reset is only available for playground workspaces" }
Error — Missing Confirmation
{ "error": "Confirmation required. Send { confirm: true } to proceed." }