Skip to main content

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
FieldTypeRequiredDescription
agent_idstringYesUnique agent identifier
namestringYesDisplay name
extensionstringYesSIP/phone extension
skillsarrayNoSkill tags for skills-based routing
max_concurrent_callsintegerNoDefault 1
statusstringNoInitial 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
FieldTypeRequiredDescription
agent_idstringYesAgent identifier
statusstringYesavailable, on_call, wrap_up, on_break, offline
reasonstringNoReason 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​

StatusReceives ContactsTypical Use
availableYesReady for new calls
on_callNoHandling a contact
wrap_upNoPost-call notes/disposition
on_breakNoLunch or short break
offlineNoLogged out

Best Practices​

  • Set wrap_up automatically after each call to give agents time to log dispositions.
  • Use reason codes on on_break so supervisors can analyze unproductive time.
  • Surface the screen pop before the call connects to cut average handle time.
  • Limit max_concurrent_calls to 1 for voice; raise it only for chat-heavy agents.

Error Handling​

CodeDescriptionAction
AGENT_NOT_FOUNDUnknown agent_idLog the agent in first
INVALID_STATUSUnsupported status valueUse a value from the status table
CALL_NOT_ASSIGNEDControl action on a call the agent does not ownVerify the call_id

Last Updated: May 2026