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
| Parameter | Type | Required | Description |
|---|---|---|---|
page | integer | No | Page number (default: 1) |
limit | integer | No | Results per page (default: 25, max: 100) |
event_type | string | No | Filter by event type (e.g., page_view, email_open) |
lead_id | string | No | Filter by specific lead |
range | string | No | Date 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
| Field | Type | Description |
|---|---|---|
id | string | Unique event identifier |
lead_id | string | Lead who performed the action |
event_type | string | Type of action (e.g., page_view, form_submit) |
metadata | object | Additional context about the event |
created_at | timestamp | When 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
| Status | Meaning | Solution |
|---|---|---|
| 401 | Unauthorized | Check authentication token |
| 500 | Server Error | Contact 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
| Status | Meaning | Solution |
|---|---|---|
| 400 | Bad Request | Provide a valid array of event IDs |
| 401 | Unauthorized | Check 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
/ingestendpoint - Use event type filters to focus on specific engagement signals
- For real-time event streaming, see the Stream endpoint
Related Endpoints
- Events for a Lead - View events for a specific lead
- Event Export - Export events as CSV
- Event Analytics - Aggregated event data
- Event Ingestion - Send events to LeadVibe