Dashboard stats
GET
https://app.sulus.ai/api/dashboard/stats
Get the Analytics dashboard overview bundle
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Errors
| Status | Meaning | Body |
|---|---|---|
401 |
Missing or invalid bearer token |
Notes
- No query parameters. Date windows are fixed: today (calls_today), start of current month (calls_this_month / this_month_minutes), last 30 days (call_trends).
- total_minutes and this_month_minutes are SUM(duration)/60 rounded to 1 decimal; avg_duration is AVG(duration) in seconds rounded to 1 decimal.
- recent_calls includes cost for every caller — this endpoint does not strip cost the way Call History list/show does for non–content-admins.
- top_assistants always includes vapi_assistant_id (live Assistants wire key) plus local id, name, phone_number, total_calls, type, and status (defaults to "active" when null).
- active_subscriptions is limited to the authenticated user's rows with status active, ordered by created_at descending. package_name falls back to "Custom" when the package relation is missing; amount prefers custom_amount then package price.
- All call/assistant counts use contentProtection() scopes.
curl --request GET \
--url https://app.sulus.ai/api/dashboard/stats \
--header 'Authorization: Bearer <YOUR_API_KEY>'
import requests
url = "https://app.sulus.ai/api/dashboard/stats"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
response = requests.get(url, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
)
func main() {
url := "https://app.sulus.ai/api/dashboard/stats"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}
Response
200
{
"success": true,
"data": {
"overview": {
"total_assistants": 4,
"total_calls": 128,
"calls_today": 3,
"calls_this_month": 41,
"total_minutes": 312.5,
"this_month_minutes": 98.2,
"avg_duration": 146.3
},
"recent_calls": [
{
"id": 1842,
"call_id": "call_01hxyz9abcdeFGHIjklmnopq",
"phone_number": "+14155550100",
"caller_number": "+14155550199",
"duration": 142,
"status": "completed",
"direction": "inbound",
"start_time": "2026-07-30T14:02:11.000000Z",
"end_time": "2026-07-30T14:04:33.000000Z",
"cost": "0.0420",
"assistant_name": "Front Desk",
"assistant_id": 57
}
],
"call_trends": [
{
"date": "2026-07-01",
"count": 5
},
{
"date": "2026-07-02",
"count": 8
},
{
"date": "2026-07-30",
"count": 3
}
],
"top_assistants": [
{
"id": 57,
"vapi_assistant_id": "asst_01habcXYZ123def456ghi789",
"name": "Front Desk",
"phone_number": "+14155550100",
"total_calls": 64,
"type": "inbound",
"status": "active"
}
],
"active_subscriptions": [
{
"id": 19,
"package_name": "Growth",
"package_id": 3,
"status": "active",
"amount": "99.00",
"current_period_start": "2026-07-01T00:00:00.000000Z",
"current_period_end": "2026-08-01T00:00:00.000000Z",
"trial_ends_at": null,
"created_at": "2026-06-15T10:00:00.000000Z"
}
]
}
}
Response — GET
/dashboard/stats
200
{
"success": true,
"data": {
"overview": {
"total_assistants": 4,
"total_calls": 128,
"calls_today": 3,
"calls_this_month": 41,
"total_minutes": 312.5,
"this_month_minutes": 98.2,
"avg_duration": 146.3
},
"recent_calls": [
{
"id": 1842,
"call_id": "call_01hxyz9abcdeFGHIjklmnopq",
"phone_number": "+14155550100",
"caller_number": "+14155550199",
"duration": 142,
"status": "completed",
"direction": "inbound",
"start_time": "2026-07-30T14:02:11.000000Z",
"end_time": "2026-07-30T14:04:33.000000Z",
"cost": "0.0420",
"assistant_name": "Front Desk",
"assistant_id": 57
}
],
"call_trends": [
{
"date": "2026-07-01",
"count": 5
},
{
"date": "2026-07-02",
"count": 8
},
{
"date": "2026-07-30",
"count": 3
}
],
"top_assistants": [
{
"id": 57,
"vapi_assistant_id": "asst_01habcXYZ123def456ghi789",
"name": "Front Desk",
"phone_number": "+14155550100",
"total_calls": 64,
"type": "inbound",
"status": "active"
}
],
"active_subscriptions": [
{
"id": 19,
"package_name": "Growth",
"package_id": 3,
"status": "active",
"amount": "99.00",
"current_period_start": "2026-07-01T00:00:00.000000Z",
"current_period_end": "2026-08-01T00:00:00.000000Z",
"trial_ends_at": null,
"created_at": "2026-06-15T10:00:00.000000Z"
}
]
}
}