Calls by classification
GET/api/analytics/classification-breakdownScope analytics:read
Calls counted by lead classification (hot, warm, cold, unclassified), most common first.
By default the last 30 days; date_from and date_to (IST calendar days) pick a range instead.
| Parameter | Type | What it is |
|---|---|---|
days | integer, 1 to 365, in the query | The last this many days, 1 to 365. date_from overrides it. Default: 30. |
date_from | string (date), or null, in the query | IST calendar day, YYYY-MM-DD. Beats days. |
date_to | string (date), or null, in the query | IST calendar day, inclusive (default today). |
agent_id | string (uuid), or null, in the query | Only calls this AI agent answered. |
team_id | string (uuid), or null, in the query | Only calls this AI team answered. |
mode | one of: ai, power, or null, in the query | Campaign mode: power or ai. |
desk_id | string (uuid), or null, in the query | Calls attributed to this desk: to or from one of its numbers, or handed over through an 'A desk' step and taken by someone on it. |
staff_user | string (uuid), or null, in the query | One team member's calls, as Call Logs' Person filter counts them: hand-overs they answered, calls they dialled from the Workspace, and calls passed or put through to them. |
campaign_id | string (uuid), or null, in the query | Calls this campaign placed. |
direction | one of: inbound, outbound, or null, in the query | Calls in or out. A web call is inbound, as on Call Logs. |
| Field | Type | What it is |
|---|---|---|
classificationrequired | string | hot, warm, cold, or unclassified. |
countrequired | integer | — |
| Code | When |
|---|---|
401 | The token is missing, unknown or revoked, or its workspace was deleted. |
402 | The workspace's plan does not include API access. The token is paused, not revoked: it works again as soon as the plan includes API access. |
403 | The token does not have this endpoint's scope, it is a sandbox token, the workspace is suspended, or the request came from a network the workspace, or the token's IP allowlist, does not allow. |
422 | A field is missing or not in the form this endpoint takes. detail says which, and why. |
429 | This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait. |
curl "https://aicallstudio.com/api/analytics/classification-breakdown?days=30" \
-H "Authorization: Bearer mtc_YOUR_TOKEN"