> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kaireonai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tenant Management

> Tenant status checks and playground workspace reset.

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 (playground tenant)

```json theme={null}
{
  "isPlayground": true,
  "isDemoMode": false,
  "hasData": true,
  "quotaUsed": 1250,
  "quotaLimit": 5000,
  "quotaExceeded": false
}
```

### Response (non-playground tenant)

```json theme={null}
{
  "isPlayground": false,
  "isDemoMode": false
}
```

<Note>
  Non-playground tenants only receive `isPlayground` and `isDemoMode`. The quota and data fields are omitted.
</Note>

| Field           | Description                                                        |
| --------------- | ------------------------------------------------------------------ |
| `isPlayground`  | Whether the tenant is a playground workspace                       |
| `isDemoMode`    | Whether the server is running in demo mode (`DEMO_MODE=true`)      |
| `hasData`       | Whether the tenant has any categories configured (playground only) |
| `quotaUsed`     | Number of decisions used (playground only)                         |
| `quotaLimit`    | Lifetime decision cap (playground only)                            |
| `quotaExceeded` | Whether the quota has been exceeded (playground only)              |

***

## POST /api/v1/tenant/reset

Reset a playground workspace, deleting all tenant data. Only available for playground tenants. **Admin only.**

<Warning>
  This permanently deletes all data in the tenant. This action cannot be undone.
</Warning>

### Request Body

| Field     | Type    | Required | Description               |
| --------- | ------- | -------- | ------------------------- |
| `confirm` | boolean | Yes      | Must be `true` to proceed |

### Example

```bash theme={null}
curl -X POST https://playground.kaireonai.com/api/v1/tenant/reset \
  -H "Content-Type: application/json" \
  -H "X-Tenant-Id: my-tenant" \ \
  -d '{ "confirm": true }'
```

### Response

```json theme={null}
{ "message": "Workspace reset successfully. Decision counter is back to 0." }
```

### Error — Non-Playground Tenant

```json theme={null}
{ "error": "Tenant reset is only available for playground workspaces" }
```

### Error — Missing Confirmation

```json theme={null}
{ "error": "Confirmation required. Send { confirm: true } to proceed." }
```
