Skip to main content
GET
/
api
/
analytics
/
summary
Get Summary Analytics
curl --request GET \
  --url https://api.example.com/api/analytics/summary
{
  "success": true,
  "data": {
    "period": {},
    "calls": {
      "total": 123,
      "completed": 123,
      "failed": 123,
      "avg_duration_seconds": 123
    },
    "spend": {
      "total_credits": 123,
      "total_usd": 123,
      "by_component": {}
    },
    "credits": {
      "added": 123,
      "used": 123
    }
  }
}
Fetches aggregated totals across your entire account for a given time period. You can optionally filter the results to a specific agent.

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 and changes data granularity to minutes.
end_datetime
string
End exact time in ISO 8601 format. Overrides end_date.
agent_id
string
Filter the summary to only include data for a specific agent.

Response

success
boolean
Indicates whether the request was successful.
data
object