Logo
Search
Docs

Overview

What Analytics covers, how it relates to Call History stats, and the response envelope.

What this reference explains

Analytics is the end-user dashboard surface: high-level call and assistant totals, the last ten calls, a 30-day call-count trend, the top five assistants by call volume, and the caller's active subscriptions. A companion activity feed merges recent calls, transactions, and assistant creations into one timeline.

In the product UI the sidebar label is Analytics and the page route is /dashboard. That page loads GET /dashboard/stats. This reference shows the exact keys those endpoints return and which tables they read.

Not the same as Call History stats

GET /call-logs/stats (documented under Call History) returns filterable camelCase aggregates (totalCalls, statusBreakdown, assistantPerformance, …). Analytics /dashboard/stats is a fixed overview bundle with snake_case overview keys, recent call rows, trend points, top assistants (including vapi_assistant_id), and subscription summaries. Do not treat the two as interchangeable.

Response envelope

Both endpoints use the panel shape {"success": true, "data": ...}. There is no pagination meta on either endpoint — limits are hard-coded in the controller (recent calls 10, trend window 30 days, top assistants 5, activity feed 15 after merge).

Feature availability

These routes are not gated by a feature flag. Any authenticated end user under the standard panel middleware (auth:sanctum + reseller context) can call them. There is no feature:analytics 403 body for this module.

Out of scope here

  • Admin dashboard (/api/admin/dashboard/*) and super-admin usage reports.
  • Call History / Squad Call History /stats endpoints.
  • Usage and overage widgets under /api/user/usage/* (Billing module).