Events
Events track every interaction and action. They are the foundation for segmentation, campaign triggers, and analytics.
List Events
GET /api/workspaces/{workspaceId}/events
Auth: Session required
Query Parameters:
| Param | Type | Default | Description |
|---|---|---|---|
contactId | string | — | Filter by contact |
type | string | — | Filter by event type |
limit | number | 50 | Max 200 |
Response:
[
{
"id": "evt_abc123",
"type": "page_view",
"metadata": { "pageUrl": "/pricing", "referrer": "https://google.com" },
"timestamp": "2026-01-15T10:00:00.000Z",
"contact": {
"id": "ct_1",
"email": "jane@example.com",
"firstName": "Jane",
"lastName": "Smith"
}
}
]Ingest Event
POST /api/workspaces/{workspaceId}/events
Creates an event and triggers side effects (segment re-evaluation, campaign triggers, lead scoring).
Auth: Session required
Request Body:
{
"type": "purchase",
"contactId": "ct_abc123",
"metadata": {
"productId": "prod_1",
"amount": 99.99,
"currency": "USD"
},
"sessionId": "sess_abc",
"pageUrl": "https://shop.example.com/checkout",
"referrer": "https://shop.example.com/cart",
"utmSource": "email",
"utmMedium": "campaign",
"utmCampaign": "summer-sale"
}| Field | Type | Required | Description |
|---|---|---|---|
type | string | Yes | Event type identifier |
contactId | string | No | Associated contact ID |
metadata | object | No | Arbitrary event payload |
sessionId | string | No | Browser session ID |
pageUrl | string | No | Page where event occurred |
referrer | string | No | Referring URL |
utmSource | string | No | UTM source parameter |
utmMedium | string | No | UTM medium parameter |
utmCampaign | string | No | UTM campaign parameter |
Response (201): Created event object.
Side Effects
When an event is ingested, the system automatically:
- Re-evaluates segments — Checks if the contact should enter or exit any segments
- Fires campaign triggers — Processes any campaigns with matching event triggers
- Updates lead score — Applies matching scoring rules to adjust the contact’s score
Common Event Types
| Type | Description |
|---|---|
page_view | Page view on the website |
form.submitted | Form submission (auto-generated) |
purchase | Purchase/conversion event |
signup | User registration |
message.open | Email/push opened (auto-generated) |
message.click | Link clicked in a message (auto-generated) |
telegram.message_received | Telegram message from contact |
| Custom | Any custom event type you define |
Last updated on