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

GET/api/adherence/statesAuth: Session

Get current agent states with adherence info.

Query Parameters:

ParameterTypeRequiredDescription
teamIdstringOptionalFilter by team

Response (200):

json
{
"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:

POST/api/v1/import/agent-statesAuth: API Key

Push 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

GET/api/adherence/alertsAuth: Session

Get adherence alerts.

Query Parameters:

ParameterTypeRequiredDescription
statusstringOptionalFilter: "active", "acknowledged", "resolved"
limitnumberOptionalMax results (default 50)

Response (200):

json
{
"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

GET/api/adherence/alerts/:idAuth: Session

Get alert details.

Update Alert

PATCH/api/adherence/alerts/:idAuth: Session

Acknowledge or resolve an alert.

Request Body:

json
{
"action": "acknowledge",
"notes": "Agent was on approved break extension"
}
ParameterTypeRequiredDescription
actionstringRequired"acknowledge" or "resolve"
notesstringOptionalNotes about the alert

Response (200):

json
{
"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 |