Event Statistics API
Get summary statistics about events for the active Organizational Unit. Useful for dashboards and overview displays.
GET /event-stats
Retrieve event statistics.
Request
| Parameter | Type | Required | Description |
|---|---|---|---|
range | string | No | Date range: today, yesterday, last_7d, last_30d, last_90d |
Response
200 OK
{
"total_events": 45000,
"total_leads": 2500,
"events_today": 320,
"events_this_week": 2100,
"top_event_types": [
{"event_type": "page_view", "count": 25000},
{"event_type": "email_open", "count": 12000},
{"event_type": "form_submit", "count": 5000}
]
}
Response Fields
| Field | Type | Description |
|---|---|---|
total_events | integer | Total events across all time |
total_leads | integer | Total unique leads with events |
events_today | integer | Events ingested today |
events_this_week | integer | Events ingested this week |
top_event_types | array | Most common event types with counts |
Example
curl -X GET "https://api.leadvibe.com/event-stats" \
-H "Authorization: Bearer <token>"
Common Errors
| Status | Meaning | Solution |
|---|---|---|
| 401 | Unauthorized | Check authentication token |
| 500 | Server Error | Contact support if persists |
Notes
- Statistics are OU-scoped to the active Organizational Unit
- Data is computed in real-time
Related Endpoints
- Events - List individual events
- Event Analytics - Detailed analytics