Skip to main content
Agents are the human telecallers logged into the Yotel softphone. These read-only endpoints let you monitor agent status and performance from your own dashboards.

List agents

Returns all agents for the tenant. No pagination — agent counts are typically under 200 per deployment.
curl https://api.yotel.in/api/v1/agents \
  -H "Authorization: Bearer yt_live_YOUR_KEY"
Scope: agents:read  |  Status: 200 OK

Response fields

FieldTypeDescription
idstringAgent UUID
user_idstringSupabase user ID
extensionstringSIP extension number
display_namestring | nullAgent display name
statusstringCurrent state: "available", "on_call", "wrap_up", "paused", "offline"
current_call_uuidstring | nullActive call UUID (null if idle)
last_status_atstring | nullISO 8601 timestamp of last status change

Get an agent

curl https://api.yotel.in/api/v1/agents/{agent_id} \
  -H "Authorization: Bearer yt_live_YOUR_KEY"
Scope: agents:read  |  Status: 200 OK

Get agent statistics

Returns rolling statistics for an agent over a configurable time window.
curl "https://api.yotel.in/api/v1/agents/{agent_id}/stats?window_hours=48" \
  -H "Authorization: Bearer yt_live_YOUR_KEY"
Scope: agents:read  |  Status: 200 OK

Query parameters

ParameterTypeDefaultDescription
window_hoursinteger24Rolling window size in hours (1–720)

Response

{
  "agent_id": "agent_abc",
  "window_hours": 48,
  "calls_total": 312,
  "calls_connected": 187,
  "calls_failed": 43,
  "avg_talk_time_s": 127.4,
  "connect_rate": 0.599
}
FieldTypeDescription
agent_idstringAgent UUID
window_hoursintegerRequested window size
calls_totalintegerTotal calls attempted
calls_connectedintegerCalls that were answered and bridged
calls_failedintegerCalls that failed (busy, no answer, error)
avg_talk_time_snumberAverage talk duration in seconds (1 decimal)
connect_ratenumbercalls_connected / calls_total (0.0 if no calls)

Errors

StatusCondition
400window_hours out of range (must be 1–720)
404Agent not found or belongs to another tenant