Skip to main content

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

ParameterTypeRequiredDescription
rangestringNoDate 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

FieldTypeDescription
total_eventsintegerTotal events across all time
total_leadsintegerTotal unique leads with events
events_todayintegerEvents ingested today
events_this_weekintegerEvents ingested this week
top_event_typesarrayMost common event types with counts

Example

curl -X GET "https://api.leadvibe.com/event-stats" \
-H "Authorization: Bearer <token>"

Common Errors

StatusMeaningSolution
401UnauthorizedCheck authentication token
500Server ErrorContact support if persists

Notes

  • Statistics are OU-scoped to the active Organizational Unit
  • Data is computed in real-time