API reference

Analytics API

3 endpoints for analytics. Send your token as a Bearer header; how tokens, scopes, limits and errors work is on the API reference page.

API reference

Before you start

  • Authentication, scopes, rate limits, errors, retrying safely and paging are explained once, on the API reference.
  • Every request needs a token with the scope shown on its endpoint; without it the answer is 403.

Analytics

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.

Parameters
ParameterTypeWhat it is
daysinteger, 1 to 365, in the queryThe last this many days, 1 to 365. date_from overrides it. Default: 30.
date_fromstring (date), or null, in the queryIST calendar day, YYYY-MM-DD. Beats days.
date_tostring (date), or null, in the queryIST calendar day, inclusive (default today).
agent_idstring (uuid), or null, in the queryOnly calls this AI agent answered.
team_idstring (uuid), or null, in the queryOnly calls this AI team answered.
modeone of: ai, power, or null, in the queryCampaign mode: power or ai.
desk_idstring (uuid), or null, in the queryCalls 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_userstring (uuid), or null, in the queryOne 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_idstring (uuid), or null, in the queryCalls this campaign placed.
directionone of: inbound, outbound, or null, in the queryCalls in or out. A web call is inbound, as on Call Logs.
Answer (200): a list, each item with these fields
FieldTypeWhat it is
classificationrequiredstringhot, warm, cold, or unclassified.
countrequiredinteger—
Errors
CodeWhen
401The token is missing, unknown or revoked, or its workspace was deleted.
402The 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.
403The 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.
422A field is missing or not in the form this endpoint takes. detail says which, and why.
429This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait.
GET /api/analytics/classification-breakdown with curl
curl "https://aicallstudio.com/api/analytics/classification-breakdown?days=30" \
  -H "Authorization: Bearer mtc_YOUR_TOKEN"

Calls by outcome

GET/api/analytics/disposition-breakdownScope analytics:read

Calls counted by outcome, most common first, each with its name in your workspace.

By default the last 30 days; date_from and date_to (IST calendar days) pick a range instead.

Parameters
ParameterTypeWhat it is
daysinteger, 1 to 365, in the queryThe last this many days, 1 to 365. date_from overrides it. Default: 30.
date_fromstring (date), or null, in the queryIST calendar day, YYYY-MM-DD. Beats days.
date_tostring (date), or null, in the queryIST calendar day, inclusive (default today).
agent_idstring (uuid), or null, in the queryOnly calls this AI agent answered.
team_idstring (uuid), or null, in the queryOnly calls this AI team answered.
modeone of: ai, power, or null, in the queryCampaign mode: power or ai.
desk_idstring (uuid), or null, in the queryCalls 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_userstring (uuid), or null, in the queryOne 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_idstring (uuid), or null, in the queryCalls this campaign placed.
directionone of: inbound, outbound, or null, in the queryCalls in or out. A web call is inbound, as on Call Logs.
Answer (200): a list, each item with these fields
FieldTypeWhat it is
dispositionrequiredstringThe outcome key, or unknown for calls with none.
labelrequiredstringThe outcome's name in your workspace.
groupstring, or nullThe group the outcome belongs to.
countrequiredinteger—
Errors
CodeWhen
401The token is missing, unknown or revoked, or its workspace was deleted.
402The 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.
403The 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.
422A field is missing or not in the form this endpoint takes. detail says which, and why.
429This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait.
GET /api/analytics/disposition-breakdown with curl
curl "https://aicallstudio.com/api/analytics/disposition-breakdown?days=30" \
  -H "Authorization: Bearer mtc_YOUR_TOKEN"

Call summary

GET/api/analytics/summaryScope analytics:read

Call totals for the last days days: calls, connected calls, minutes, duration and score.

A connected call is one someone picked up; an answering machine does not count.

Parameters
ParameterTypeWhat it is
daysinteger, 1 to 365, in the queryThe period: the last this many days, 1 to 365. Default: 30.
agent_idstring (uuid), or null, in the queryOnly calls this AI agent answered.
team_idstring (uuid), or null, in the queryOnly calls this AI team answered.
modeone of: ai, power, or null, in the queryCampaign mode: power or ai.
campaign_onlyboolean, in the queryCount only calls a campaign placed. Default: false.
Answer (200): these fields
FieldTypeWhat it is
period_daysrequiredintegerThe period counted: the last days days.
total_callsrequiredinteger—
completed_callsrequiredintegerCalls someone picked up. The same number as connected_calls.
connected_callsrequiredintegerCalls someone picked up. An answering machine does not count.
completion_raterequirednumberConnected calls as a percentage of all calls, to one decimal place.
total_billed_minutesnumber, or nullMinutes billed for these calls.
avg_duration_secrequirednumber—
avg_qa_scorenumber, or nullAverage lead score of the scored calls; null when none was scored.
Errors
CodeWhen
401The token is missing, unknown or revoked, or its workspace was deleted.
402The 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.
403The 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.
422A field is missing or not in the form this endpoint takes. detail says which, and why.
429This token has made more requests this minute than your plan allows. The Retry-After header says how many seconds to wait.
GET /api/analytics/summary with curl
curl "https://aicallstudio.com/api/analytics/summary?days=30" \
  -H "Authorization: Bearer mtc_YOUR_TOKEN"

Put AI Call Studio on your phone lines.

Book a 30-minute walkthrough, or call us right now: +91 922 222 1378