Switch active tenant
active_tenant_id cookie (30-day expiry) and returns { "success": true }.
Path parameters
UUID of the tenant to activate. Must be a valid UUID v4 format.
Response
Always
true on success.Error responses
| Status | Condition |
|---|---|
400 | tenantId is missing or not a valid UUID. |
401 | Not authenticated. |
403 | User is not a member of the specified tenant and is not a superadmin. |
- Request
- Response
Switch active tenant (redirect)
/excel. Designed for use in navigation links rather than programmatic API calls.
- If the user is not authenticated, redirects to
/. - If the user is not a member of the tenant and is not a superadmin, redirects to
/onboarding. - On success, sets the
active_tenant_idcookie and redirects to/excel.
Path parameters
UUID of the tenant to activate.
Get tenant usage
Response
Active tenant UUID.
The tenant’s subscription plan.
Current usage counters.
- Request
- Response
Increment tenant usage
Request body
Bytes to add (positive) or remove (negative) from storage usage.
AI tokens to add to usage.
WhatsApp messages to add to usage.
Optional human-readable reason for the adjustment (logged in usage event history).
Optional metadata object logged with the usage event.
At least one delta field must be non-zero.
Response
Always
true on success.Updated plan object (same structure as GET response).
Updated usage counters (same structure as GET response).
Error responses
| Status | Error code | Description |
|---|---|---|
400 | — | No delta fields provided or values are not finite numbers. |
402 | storage_limit_exceeded | Storage limit would be exceeded. |
402 | ai_limit_exceeded | AI token limit would be exceeded. |
402 | whatsapp_limit_exceeded | WhatsApp message limit would be exceeded. |
403 | insufficient_privilege | The operation is not permitted for this user’s role. |
- Request
- Response
