Skip to main content

Agent Presence Monitoring

Monitor real-time agent availability and status in the contact center. Track which agents are available, on calls, or offline.

Get Agent Presence​

GET /v2/accounts/<account_sid>/agents/presence

Base URL​

Data CenterBase URL
Singaporehttps://ccm-api.exotel.com
Mumbaihttps://ccm-api.in.exotel.com

Query Parameters​

ParameterTypeRequiredDescription
statusStringNoFilter by agent status: available, busy, on-call, offline, after-call-work
team_idStringNoFilter by team
limitIntegerNoResults per page (default: 20, max: 100)
offsetIntegerNoPagination offset

Example Request​

curl -X GET \
'https://ccm-api.exotel.com/v2/accounts/<account_sid>/agents/presence?status=available' \
-H 'Authorization: Bearer <access_token>' \
-H 'Content-Type: application/json'

Response​

{
"request_id": "req_presence_001",
"method": "GET",
"http_code": 200,
"response": {
"code": 200,
"status": "success",
"data": {
"agents": [
{
"user_id": "agent_001",
"name": "John Agent",
"email": "john@company.com",
"status": "available",
"status_since": "2024-06-15T09:00:00.000Z",
"device": {
"type": "softphone",
"contact_uri": "sip:john@company.com"
},
"team": {
"team_id": "sales_team",
"name": "Sales"
},
"stats": {
"calls_handled_today": 15,
"avg_handle_time": 240,
"total_talk_time": 3600
}
},
{
"user_id": "agent_002",
"name": "Jane Support",
"email": "jane@company.com",
"status": "available",
"status_since": "2024-06-15T09:30:00.000Z",
"device": {
"type": "phone",
"contact_uri": "+919876543210"
},
"team": {
"team_id": "support_team",
"name": "Support"
},
"stats": {
"calls_handled_today": 22,
"avg_handle_time": 180,
"total_talk_time": 3960
}
}
],
"summary": {
"total_agents": 25,
"available": 12,
"on_call": 8,
"busy": 2,
"after_call_work": 1,
"offline": 2
}
},
"metadata": {
"total": 12,
"limit": 20,
"offset": 0
}
}
}

Get Single Agent Presence​

GET /v2/accounts/<account_sid>/agents/<user_id>/presence

Response​

{
"response": {
"data": {
"user_id": "agent_001",
"name": "John Agent",
"status": "on-call",
"status_since": "2024-06-15T10:30:00.000Z",
"current_call": {
"call_sid": "call_active_123",
"direction": "outbound",
"customer_number": "+919876543210",
"duration": 120
}
}
}
}

Update Agent Status​

PUT /v2/accounts/<account_sid>/agents/<user_id>/presence

Request Body​

{
"status": "available"
}

Valid Status Transitions​

FromTo
offlineavailable
availablebusy, offline
after-call-workavailable, offline
busyavailable, offline
info

Status changes to/from on-call are managed automatically by the system during active calls.

Agent Status Values​

StatusDescription
availableAgent is ready to receive calls
on-callAgent is on an active call (system-managed)
busyAgent is busy (manually set)
after-call-workAgent is completing post-call tasks
offlineAgent is not available

HTTP Status Codes​

CodeDescription
200Success
400Bad Request — Invalid status transition
401Unauthorized
404Not Found — Agent doesn't exist
429Rate Limited

Try It​