Rela AIRela AI Docs
API Reference

Admin API

Billing, SSO, audit, notifications, and escalation rules endpoints.

Billing

MethodEndpointDescription
GET/api/v1/admin/billing/planCurrent tenant plan
PUT/api/v1/admin/billing/planChange plan
GET/api/v1/admin/billing/usageCurrent period usage
GET/api/v1/admin/billing/usage/historyMonthly usage history
GET/api/v1/admin/billing/invoicesList 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

MethodEndpointDescription
GET/api/v1/admin/sso/configGet SSO configuration
POST/api/v1/admin/sso/configConfigure SAML SSO
PUT/api/v1/admin/sso/configUpdate configuration
DELETE/api/v1/admin/sso/configDeactivate SSO
POST/api/v1/admin/sso/loginInitiate SSO flow
POST/api/v1/admin/sso/callbackACS callback (IdP response)
SSO endpoints require Enterprise plan and manage_settings permission.

Audit

MethodEndpointDescription
GET/api/v1/admin/auditList records
GET/api/v1/admin/audit/exportExport for compliance
GET/api/v1/admin/audit/resource/{resource_type}/{resource_id}Resource history
GET/api/v1/admin/audit/verify-chainVerify integrity

Available filters for listing:

ParameterTypeDescription
resource_typestringResource type
resource_idstringResource ID
actionstringcreate, update, delete
actorstringActor ID
start_datedateRange start
end_datedateRange end

Notifications

MethodEndpointDescription
GET/api/v1/admin/notificationsList notifications
POST/api/v1/admin/notificationsCreate notification
PUT/api/v1/admin/notifications/{notification_id}/readMark as read
PUT/api/v1/admin/notifications/read-allMark all as read
GET/api/v1/admin/notifications/preferencesUser preferences
PUT/api/v1/admin/notifications/preferencesUpdate preferences

Notification types: alert, task, maintenance, system, billing.

Available channels: in_app, email, whatsapp, push.

Escalation Rules

Rules define how unattended alerts are escalated:

MethodEndpointDescription
GET/api/v1/admin/escalation-rulesList rules
POST/api/v1/admin/escalation-rulesCreate 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.

On this page