API reference

Reports API

2 endpoints for reports. 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.

Reports

List saved reports

GET/api/v1/reportsScope reports:read

Your saved custom reports and dashboards (Reports -> Custom): the ones shared with the workspace and the key creator's own. Archived ones are left out. Use an id to run one.

Parameters
ParameterTypeWhat it is
kindstring, or null, in the queryOnly reports, or only dashboards.
Answer (200): these fields
FieldTypeWhat it is
datarequiredlist of objects—
data[].idrequiredstring (uuid)—
data[].namerequiredstring—
data[].kindrequiredstringreport or dashboard.
data[].sourcestring, or nullWhat a report counts (calls, messages and so on), in words.
data[].sharedrequiredbooleanShared with the workspace, or kept by the key's owner.
data[].updated_atstring (date-time), or null—
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/v1/reports with curl
curl "https://aicallstudio.com/api/v1/reports" \
  -H "Authorization: Bearer mtc_YOUR_TOKEN"

Run a saved report

GET/api/v1/reports/{report_id}/runScope reports:read

Run a saved custom report or dashboard now and get its figures, exactly as the Custom reports screen would show them to the key's owner. A report comes as JSON or CSV; a dashboard as JSON. Each run is a real query, capped at 10 seconds, and a key may run 30 a minute.

Parameters
ParameterTypeWhat it is
report_idrequiredstring (uuid), in the path—
formatstring, in the queryjson, or csv for a report's table. Default: json.
Answer (200): these fields
FieldTypeWhat it is
idrequiredstring (uuid)—
namerequiredstring—
kindrequiredstring—
resultobject, or nullA report: its columns, rows, totals and range, as the Custom reports screen shows them.
pageslist of object, or nullA dashboard: each page with its widgets' figures.
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.
404No saved report of yours has this id.
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.
503Reports are switched off on the platform for now.
GET /api/v1/reports/{report_id}/run with curl
curl "https://aicallstudio.com/api/v1/reports/YOUR_REPORT_ID/run?format=csv" \
  -H "Authorization: Bearer mtc_YOUR_TOKEN" \
  -o contacts.csv

Put AI Call Studio on your phone lines.

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