Agent Dashboard
The Agent Dashboard is the unified workspace where agents take voice calls, handle SMS and WhatsApp conversations, view customer context, and manage their availability. This page covers the APIs that power the dashboard so you can embed agent controls in your own tools or build automations.
Overview
Each agent session combines:
- Presence — availability status that controls whether the agent receives routed contacts
- Active contacts — the live calls and messages assigned to the agent
- Customer context — caller history, tags, and CRM data surfaced on screen pop
- Controls — hold, mute, transfer, conference, and recording toggles
All requests use https://api.afriroute.ai with Authorization: Bearer $AFRIROUTE_API_KEY.
Endpoints
Agent Login
POST /v1/voice/agent/login
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Unique agent identifier |
name | string | Yes | Display name |
extension | string | Yes | SIP/phone extension |
skills | array | No | Skill tags for skills-based routing |
max_concurrent_calls | integer | No | Default 1 |
status | string | No | Initial status, default available |
curl -X POST https://api.afriroute.ai/api/v1/voice/agent/login \
-H "Authorization: Bearer $AFRIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_sarah_k",
"name": "Sarah Kebede",
"extension": "101",
"skills": ["billing", "technical_support", "amharic"],
"status": "available"
}'
{
"agent_id": "agent_sarah_k",
"session_id": "sess_9f2a",
"status": "available",
"logged_in_at": "2026-05-28T09:00:00Z"
}
Update Status
POST /v1/voice/agent/status
| Field | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Agent identifier |
status | string | Yes | available, on_call, wrap_up, on_break, offline |
reason | string | No | Reason code (e.g. lunch_break) |
await fetch('https://api.afriroute.ai/api/v1/voice/agent/status', {
method: 'POST',
headers: {
'Authorization': 'Bearer $AFRIROUTE_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_id: 'agent_sarah_k',
status: 'on_break',
reason: 'lunch_break'
})
});
import requests
requests.post(
'https://api.afriroute.ai/api/v1/voice/agent/status',
headers={'Authorization': 'Bearer $AFRIROUTE_API_KEY'},
json={'agent_id': 'agent_sarah_k', 'status': 'wrap_up'}
)
Get Customer Context (Screen Pop)
GET /v1/voice/agent/:agent_id/context
{
"agent_id": "agent_sarah_k",
"call_id": "call_abc123",
"customer": {
"phone": "+251911234567",
"name": "Abel Tesfaye",
"tags": ["vip", "postpaid"],
"last_contact": "2026-05-20T11:00:00Z",
"open_tickets": [{ "id": "TKT_4521", "subject": "Billing dispute" }]
}
}
Agent Controls
POST /v1/voice/call/:call_id/control
curl -X POST https://api.afriroute.ai/api/v1/voice/call/call_abc123/control \
-H "Authorization: Bearer $AFRIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "action": "hold" }'
Supported actions: hold, unhold, mute, unmute, pause_recording, resume_recording, hangup.
Agent Status Reference
| Status | Receives Contacts | Typical Use |
|---|---|---|
available | Yes | Ready for new calls |
on_call | No | Handling a contact |
wrap_up | No | Post-call notes/disposition |
on_break | No | Lunch or short break |
offline | No | Logged out |
Best Practices
- Set
wrap_upautomatically after each call to give agents time to log dispositions. - Use reason codes on
on_breakso supervisors can analyze unproductive time. - Surface the screen pop before the call connects to cut average handle time.
- Limit
max_concurrent_callsto1for voice; raise it only for chat-heavy agents.
Error Handling
| Code | Description | Action |
|---|---|---|
AGENT_NOT_FOUND | Unknown agent_id | Log the agent in first |
INVALID_STATUS | Unsupported status value | Use a value from the status table |
CALL_NOT_ASSIGNED | Control action on a call the agent does not own | Verify the call_id |
Related Links
Last Updated: May 2026