Skip to main content

Events API

Retrieve engagement events for the active Organizational Unit. Events represent lead actions such as page views, email opens, form submissions, and other tracked interactions.

GET /events

List all events for the active Organizational Unit with optional filtering and pagination.

Request

ParameterTypeRequiredDescription
pageintegerNoPage number (default: 1)
limitintegerNoResults per page (default: 25, max: 100)
event_typestringNoFilter by event type (e.g., page_view, email_open)
lead_idstringNoFilter by specific lead
rangestringNoDate range filter: today, yesterday, last_7d, last_30d, last_90d

Response

200 OK

{
"events": [
{
"id": "evt-123",
"lead_id": "ld_456",
"event_type": "page_view",
"metadata": {
"path": "/pricing",
"referrer": "https://google.com"
},
"created_at": "2025-01-15T10:30:00Z"
},
{
"id": "evt-124",
"lead_id": "ld_789",
"event_type": "email_open",
"metadata": {
"campaign": "Q1 Nurture"
},
"created_at": "2025-01-15T10:25:00Z"
}
],
"total": 150,
"page": 1,
"limit": 25
}

Response Fields

FieldTypeDescription
idstringUnique event identifier
lead_idstringLead who performed the action
event_typestringType of action (e.g., page_view, form_submit)
metadataobjectAdditional context about the event
created_attimestampWhen the event occurred

Example

curl -X GET "https://api.leadvibe.com/events?page=1&limit=25&event_type=page_view" \
-H "Authorization: Bearer <token>"

Common Errors

StatusMeaningSolution
401UnauthorizedCheck authentication token
500Server ErrorContact support if persists

DELETE /events/batch

Delete multiple events by ID. This action cannot be undone.

Request Body

{
"event_ids": ["evt-123", "evt-124", "evt-125"]
}

Response

200 OK

Common Errors

StatusMeaningSolution
400Bad RequestProvide a valid array of event IDs
401UnauthorizedCheck authentication token

Notes

  • Events are OU-scoped and only return data for the active Organizational Unit
  • Events are created automatically when data is ingested via the /ingest endpoint
  • Use event type filters to focus on specific engagement signals
  • For real-time event streaming, see the Stream endpoint