Skip to content
Pathbound DOCS

Events API

Events are tracked interactions across all connected sources — page views, form submissions, button clicks, video plays, email opens, custom events. The tracker is the primary source, but events can also come from email integrations, CRM syncs, and track() calls.

All endpoints require events:read.

GET /v1/events
ParameterTypeDefaultDescription
pagenumber1Page number.
limitnumber20Results per page (1–100).
event_typestringFilter by exact event name (e.g. page_view).
contact_idstringFilter to a single contact’s events.
domainstringFilter by domain (host where the event was recorded).
url_containsstringFilter where event URL contains this substring.
date_afterstringISO 8601 — events at or after this timestamp.
date_beforestringISO 8601 — events at or before this timestamp.
identified_onlybooleanfalseOnly include events linked to a known contact.
searchstringFree-text across event name, URL, domain.
sort_bystringtimestampOne of timestamp, event, createdAt.
sort_dirstringdescasc or desc.
count_onlybooleanfalseIf true, return only { count } — no records.
fieldsstringSet to summary for a compact projection (no enrichment).

By default, events are enriched with the associated contact and company:

{
"status": "success",
"events": [
{
"_id": "evt_abc",
"event": "page_view",
"timestamp": "2026-04-29T11:23:45.000Z",
"url": "https://example.com/pricing",
"domain": "example.com",
"data": { "title": "Pricing — Example", "path": "/pricing" },
"internal_contact_id": "ct_abc",
"contact": {
"_id": "ct_abc",
"email": "[email protected]",
"firstname": "Ada",
"lastname": "Lovelace"
},
"company": {
"_id": "co_xyz",
"name": "Analytical Engines",
"domain": "example.com"
}
}
],
"pagination": { "page": 1, "limit": 20, "total_pages": 12, "total_items": 234 }
}

In fields=summary mode, each event is reduced to { id, event, timestamp, url, contact_id } — useful for high-volume listings.


GET /v1/events/types

Returns the distinct event names recorded for the tenant. Useful for populating a filter dropdown.

{
"status": "success",
"types": ["button_click", "first_visit", "form_submit", "page_view", "video_play"],
"total_items": 5
}

GET /v1/events/stats

Aggregated counts, optionally grouped by type, domain, or day. Use this for dashboards instead of paginating the list endpoint.

ParameterTypeDefaultDescription
event_typestringFilter to a single event type.
domainstringFilter to a single domain.
date_afterstringISO 8601 lower bound.
date_beforestringISO 8601 upper bound.
identified_onlybooleanfalseOnly count events linked to a known contact.
group_bystringOne of type, domain, day. Omit for all three.
{
"status": "success",
"stats": {
"total": 12_503,
"by_type": [
{ "type": "page_view", "count": 9_812 },
{ "type": "button_click", "count": 1_204 }
],
"by_domain": [
{ "domain": "example.com", "count": 11_900 }
],
"by_day": [
{ "date": "2026-04-29", "count": 432 },
{ "date": "2026-04-28", "count": 511 }
]
}
}

by_day is capped at the most recent 90 days. by_type and by_domain are capped at 50 entries each.


GET /v1/events/:event_id

Returns the full event document, enriched with associated contact and company.

For richer aggregations across contacts, companies, or events with custom dimensions and metrics, use the Aggregate endpoint.