Skip to main content
GET
/
api
/
analytics
/
agents
Get Agent Analytics
curl --request GET \
  --url https://api.example.com/api/analytics/agents
{
  "success": true,
  "data": {
    "period": {},
    "agents": [
      {
        "agent_id": "<string>",
        "agent_name": "<string>",
        "total_calls": 123,
        "total_cost_credits": 123,
        "avg_duration_seconds": 123
      }
    ]
  }
}
Provides a breakdown of call volume, costs, and average duration for individual agents over a specified period. This helps identify which agents handle the most traffic or consume the most credits.

Query Parameters

start_date
string
Start date in YYYY-MM-DD format. Defaults to 30 days ago.
end_date
string
End date in YYYY-MM-DD format. Defaults to today.
start_datetime
string
Start exact time in ISO 8601 format (e.g. 2024-03-01T14:30:00Z). Overrides start_date.
end_datetime
string
End exact time in ISO 8601 format. Overrides end_date.
limit
integer
default:"10"
Maximum number of agents to return. Values must be between 1 and 50.

Response

success
boolean
Indicates whether the request was successful.
data
object