API Reference
Admin API
Billing, SSO, audit, notifications, and escalation rules endpoints.
Billing
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/admin/billing/plan | Current tenant plan |
PUT | /api/v1/admin/billing/plan | Change plan |
GET | /api/v1/admin/billing/usage | Current period usage |
GET | /api/v1/admin/billing/usage/history | Monthly usage history |
GET | /api/v1/admin/billing/invoices | List invoices |
Example usage response:
{
"agents": { "used": 3, "limit": 5 },
"events": { "used": 4200, "limit": 10000 },
"storage_mb": { "used": 312, "limit": 1024 },
"period_start": "2026-03-01T00:00:00Z",
"period_end": "2026-03-31T23:59:59Z"
}SSO
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/admin/sso/config | Get SSO configuration |
POST | /api/v1/admin/sso/config | Configure SAML SSO |
PUT | /api/v1/admin/sso/config | Update configuration |
DELETE | /api/v1/admin/sso/config | Deactivate SSO |
POST | /api/v1/admin/sso/login | Initiate SSO flow |
POST | /api/v1/admin/sso/callback | ACS callback (IdP response) |
SSO endpoints require Enterprise plan and
manage_settings permission.Audit
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/admin/audit | List records |
GET | /api/v1/admin/audit/export | Export for compliance |
GET | /api/v1/admin/audit/resource/{resource_type}/{resource_id} | Resource history |
GET | /api/v1/admin/audit/verify-chain | Verify integrity |
Available filters for listing:
| Parameter | Type | Description |
|---|---|---|
resource_type | string | Resource type |
resource_id | string | Resource ID |
action | string | create, update, delete |
actor | string | Actor ID |
start_date | date | Range start |
end_date | date | Range end |
Notifications
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/admin/notifications | List notifications |
POST | /api/v1/admin/notifications | Create notification |
PUT | /api/v1/admin/notifications/{notification_id}/read | Mark as read |
PUT | /api/v1/admin/notifications/read-all | Mark all as read |
GET | /api/v1/admin/notifications/preferences | User preferences |
PUT | /api/v1/admin/notifications/preferences | Update preferences |
Notification types: alert, task, maintenance, system, billing.
Available channels: in_app, email, whatsapp, push.
Escalation Rules
Rules define how unattended alerts are escalated:
| Method | Endpoint | Description |
|---|---|---|
GET | /api/v1/admin/escalation-rules | List rules |
POST | /api/v1/admin/escalation-rules | Create rule |
PUT | /api/v1/admin/escalation-rules/{rule_id} | Update rule |
DELETE | /api/v1/admin/escalation-rules/{rule_id} | Delete rule |
{
"name": "Escalate critical alarms",
"trigger": { "event_type": "alarm", "severity": "critical", "unattended_minutes": 30 },
"actions": [
{ "type": "notify", "target": "user_supervisor_id", "channel": "whatsapp" },
{ "type": "reassign", "target": "user_supervisor_id" }
]
}Escalation rules are evaluated every minute. Make sure escalation times are reasonable to avoid excessive notifications.