Adherence API
Endpoints for real-time agent states and adherence alerts. Adherence features require the Enterprise subscription tier.
Supervisors only see agents from their assigned teams. Admins see all agents in the organization.
Agent States
Get Current States
/api/adherence/statesAuth: SessionGet current agent states with adherence info.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
teamId | string | Optional | Filter by team |
Response (200):
{ "states": [ { "employeeId": "uuid", "employeeName": "John Doe", "employeeNumber": "EMP001", "state": "available", "stateStartedAt": "2026-01-29T08:00:00Z", "queue": "sales", "scheduledState": "available", "isAdherent": true, "shift": { "startTime": "08:00", "endTime": "16:00" } } ], "summary": { "totalAgents": 25, "adherentCount": 23, "adherencePercentage": 92 }}Push Agent States (via External API)
To push agent state changes from your ACD, use the external integration endpoint:
/api/v1/import/agent-statesAuth: API KeyPush agent state changes from ACD (coming soon).
This endpoint is not yet implemented and currently returns HTTP 501. See the Integration API for details on the planned interface.
Valid States:
| State | Description |
|-------|-------------|
| available | Ready to take contacts |
| on_call | Handling a contact |
| after_call_work | Post-call tasks |
| break | On break |
| lunch | On lunch |
| meeting | In a meeting |
| training | In training |
| offline | Not logged in |
| unavailable | Logged in but not available |
Adherence Alerts
List Alerts
/api/adherence/alertsAuth: SessionGet adherence alerts.
Query Parameters:
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | Optional | Filter: "active", "acknowledged", "resolved" |
limit | number | Optional | Max results (default 50) |
Response (200):
{ "alerts": [ { "id": "uuid", "employeeId": "uuid", "employeeName": "John Doe", "type": "late_start", "message": "Agent logged in 15 minutes late", "status": "active", "createdAt": "2026-01-29T08:15:00Z", "acknowledgedAt": null, "resolvedAt": null } ]}Get Alert Details
/api/adherence/alerts/:idAuth: SessionGet alert details.
Update Alert
/api/adherence/alerts/:idAuth: SessionAcknowledge or resolve an alert.
Request Body:
{ "action": "acknowledge", "notes": "Agent was on approved break extension"}| Parameter | Type | Required | Description |
|---|---|---|---|
action | string | Required | "acknowledge" or "resolve" |
notes | string | Optional | Notes about the alert |
Response (200):
{ "success": true, "alert": { "id": "uuid", "status": "acknowledged", "acknowledgedAt": "2026-01-29T08:20:00Z", "notes": "Agent was on approved break extension" }}Alert Types
| Type | Description | Trigger |
|------|-------------|---------|
| late_start | Agent logged in late | After grace period from shift start |
| early_leave | Agent logged off early | Before shift end |
| extended_break | Break exceeded duration | Break over configured limit |
| unscheduled_break | Break during work time | Break not during scheduled break |
| wrong_state | State mismatch | Actual differs from scheduled |