Skip to main contentSkip to Content
Events

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:

ParamTypeDefaultDescription
contactIdstringFilter by contact
typestringFilter by event type
limitnumber50Max 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" }
FieldTypeRequiredDescription
typestringYesEvent type identifier
contactIdstringNoAssociated contact ID
metadataobjectNoArbitrary event payload
sessionIdstringNoBrowser session ID
pageUrlstringNoPage where event occurred
referrerstringNoReferring URL
utmSourcestringNoUTM source parameter
utmMediumstringNoUTM medium parameter
utmCampaignstringNoUTM campaign parameter

Response (201): Created event object.

Side Effects

When an event is ingested, the system automatically:

  1. Re-evaluates segments — Checks if the contact should enter or exit any segments
  2. Fires campaign triggers — Processes any campaigns with matching event triggers
  3. Updates lead score — Applies matching scoring rules to adjust the contact’s score

Common Event Types

TypeDescription
page_viewPage view on the website
form.submittedForm submission (auto-generated)
purchasePurchase/conversion event
signupUser registration
message.openEmail/push opened (auto-generated)
message.clickLink clicked in a message (auto-generated)
telegram.message_receivedTelegram message from contact
CustomAny custom event type you define
Last updated on