Skip to main content
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
}
FieldDescription
isPlaygroundWhether the tenant is a playground workspace
hasDataWhether the tenant has any categories configured
quotaUsedNumber of decisions used (playground only)
quotaLimitLifetime decision cap (playground only)
quotaExceededWhether 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

FieldTypeRequiredDescription
confirmbooleanYesMust 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." }