Call Center Quick Start
Launch a fully working AfriRoute Call Center, route your first inbound call to a live agent, and view real-time metrics in about 10 minutes.
Overview
This guide walks you through the minimum setup needed to take calls:
- Authenticate against the API
- Create a call queue
- Register and log in an agent
- Build a one-level IVR that routes callers into the queue
- Point your AfriRoute phone number at the IVR
- Place a test call and watch live metrics
All requests use the base URL https://api.afriroute.ai and a bearer token:
Authorization: Bearer $AFRIROUTE_API_KEY
Step 1 — Create a Call Queue
POST /v1/voice/queue
curl -X POST https://api.afriroute.ai/api/v1/voice/queue \
-H "Authorization: Bearer $AFRIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Support",
"routing_strategy": "round_robin",
"max_wait_time": 300,
"callback_enabled": true
}'
{
"queue_id": "queue_support",
"name": "Support",
"routing_strategy": "round_robin",
"status": "active",
"created_at": "2026-05-28T09:00:00Z"
}
Step 2 — Register and Log In an Agent
POST /v1/voice/agent/login
const res = await fetch('https://api.afriroute.ai/api/v1/voice/agent/login', {
method: 'POST',
headers: {
'Authorization': 'Bearer $AFRIROUTE_API_KEY',
'Content-Type': 'application/json'
},
body: JSON.stringify({
agent_id: 'agent_sarah_k',
name: 'Sarah Kebede',
extension: '101',
skills: ['support', 'amharic'],
status: 'available'
})
});
console.log((await res.json()).agent_id); // agent_sarah_k
import requests
requests.post(
'https://api.afriroute.ai/api/v1/voice/agent/login',
headers={'Authorization': 'Bearer $AFRIROUTE_API_KEY'},
json={
'agent_id': 'agent_sarah_k',
'name': 'Sarah Kebede',
'extension': '101',
'skills': ['support', 'amharic'],
'status': 'available'
}
)
Step 3 — Build a Simple IVR
POST /v1/voice/ivr
curl -X POST https://api.afriroute.ai/api/v1/voice/ivr \
-H "Authorization: Bearer $AFRIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Main Menu",
"greeting": "Welcome to AfriRoute. Press 1 for Support.",
"language": "en-US",
"voice": "female",
"options": [
{ "digit": "1", "action": "transfer", "destination": "queue_support" }
],
"timeout": 10
}'
Step 4 — Attach Your Number
POST /v1/voice/numbers/:number/assign
curl -X POST https://api.afriroute.ai/api/v1/voice/numbers/+251116000000/assign \
-H "Authorization: Bearer $AFRIROUTE_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "ivr_id": "ivr_main_menu" }'
Step 5 — Watch It Live
curl https://api.afriroute.ai/api/v1/call-center/metrics/realtime \
-H "Authorization: Bearer $AFRIROUTE_API_KEY"
Call your number, press 1, and the call rings Sarah's extension while calls_waiting and agents_on_call update in real time.
Best Practices
- Register agent skills up front so you can switch to skills-based routing later without rebuilding queues.
- Enable
callback_enabledto avoid abandoned calls during peak hours. - Use a short, clear IVR greeting (under 10 seconds) to reduce caller drop-off.
- Test against a sandbox number before pointing production traffic at a new flow.
Error Handling
| Code | Description | Action |
|---|---|---|
QUEUE_NOT_FOUND | IVR destination references a missing queue | Create the queue first |
AGENT_ALREADY_LOGGED_IN | Agent session already active | Reuse the session or log out |
NUMBER_NOT_PROVISIONED | Number not on your account | Buy/port the number first |
UNAUTHORIZED | Invalid or missing API key | Check the Authorization header |
Related Links
Last Updated: May 2026