Skip to main content
POST
Ingest Events

Endpoint

Path Parameters

publicKey
string
required
Your organization’s public key. Starts with pk_.

Request Body

Body Parameters

visitorId
string
Unique identifier for the visitor (UUID format). Required for browser (client) tracking. For server-side tracking (server source), this can be omitted; identity or attribution is derived from email, userId, fingerprint, or customerId in the events.
source
string
default:"client"
Event source. One of: client (browser), server, integration.
events
array
required
Array of event objects to ingest (max 100 per request).
userIdentity
object
Optional user identity for immediate resolution. Used by browser SDK when user is logged in (via setUser()). Allows direct identity resolution instead of anonymous visitor flow.
customerIdentity
object
Optional customer/account attribution for the whole batch. Used by browser SDK when the current user carries account/workspace context.

Event Types

All events share these common fields:

UTM Parameters


Pageview Event

Track a page view.
type
string
required
Must be "pageview".
title
string
Page title.

Custom Event

Track any custom event.
type
string
required
Must be "custom".
eventName
string
required
Name of the custom event.
properties
object
Key-value pairs of event properties. Values can be string, number, boolean, or null.

Form Event

Track a form submission.
type
string
required
Must be "form".
formId
string
Identifier for the form (ID attribute or name).
formFields
object
Key-value pairs of form field values.
Sensitive fields (password, credit_card, ssn, etc.) are automatically stripped on the server. Don’t send them.

Identify Event

Identify the visitor with their email/userId.
type
string
required
Must be "identify".
email
string
User’s email address. At least one of email or userId required.
userId
string
Your system-owned user/contact ID.
traits
object
Properties to set on the user profile.
customerId
string
Your system-owned customer/account/workspace ID. Send it with an identify event when you want that external account/workspace to link to the contact resolved from email or userId.
customerTraits
object
Properties to set on the customer profile.

Engagement Event

Track active time on a page. Automatically sent by the browser SDK.
type
string
required
Must be "engagement".
activeTimeMs
number
required
Time in milliseconds the user was actively engaged (visible tab + user interactions).
totalTimeMs
number
required
Total wall-clock time in milliseconds on the page.
sessionId
string
required
Session ID (UUID) for grouping engagement events. Resets after 30 min of inactivity or tab close.

Calendar Event

Track calendar booking from embedded widgets (Cal.com, Calendly).
type
string
required
Must be "calendar".
provider
string
required
Calendar provider: "cal.com", "calendly", or "unknown".
eventType
string
Meeting type name (e.g., “30 Minute Demo”).
startTime
string
Scheduled start time (ISO 8601 format).
endTime
string
Scheduled end time (ISO 8601 format).
duration
number
Duration in minutes.
isRecurring
boolean
Whether this is a recurring meeting.
inviteeEmail
string
Invitee’s email (only available via server-side webhooks).
inviteeName
string
Invitee’s name (only available via server-side webhooks).

Response

Success Response

success
boolean
Whether the request was successful.
processed
number
Number of events successfully processed.
errors
array
Array of processing errors (only present if some events failed).

Partial Success Response (HTTP 207)

When some events succeed and others fail:

Error Response

Examples

cURL - Browser Events

cURL - Server Events

JavaScript (fetch)

Python

Server-Side Events

For server-side tracking, the visitorId field can be omitted. Identity is resolved from the event data, including customer-only attribution when customerId is provided:
  • Identify events: Use email and/or userId fields, plus optional customer context
  • Custom events: Include top-level email, userId, fingerprint, and/or customerId fields
Server events require identity or account attribution. Custom events need at least one of email, userId, fingerprint, or customerId; identify events need email or userId.

Batching Best Practices

For high-volume tracking:
  1. Batch events - Send multiple events per request (up to 100)
  2. Use background queue - Don’t block user actions
  3. Retry with backoff - Handle temporary failures
  4. Flush on shutdown - Send remaining events before exit