Skip to main content

Analytics

The analytics endpoint returns aggregated metrics for a workspace dashboard — KPIs, activity timelines, event breakdowns, and top-performing rooms and booking pages. All data is computed on the fly from contact events and workspace records.

note

Requires authentication (requireAuth). Any workspace member can access analytics.


Get Workspace Analytics

GET /api/workspaces/:workspaceId/analytics

No query parameters. Returns a single response object with six top-level fields.

Response:

{
"kpis": {
"rooms": 12,
"recordings": 34,
"recordingDuration": 183600,
"contacts": 210,
"bookings": 87
},
"activityTimeline": [
{ "date": "2026-02-24", "bookings": 3, "room_joins": 7 },
{ "date": "2026-02-25", "bookings": 1, "room_joins": 4 },
{ "date": "2026-03-25", "bookings": 5, "room_joins": 12 }
],
"eventTypeBreakdown": [
{ "type": "room_join", "count": 163 },
{ "type": "booking", "count": 87 }
],
"topBookingPages": [
{ "id": 1, "title": "30-min Intro Call", "slug": "intro-call", "count": 42 },
{ "id": 2, "title": "Demo Session", "slug": "demo", "count": 27 }
],
"newContactsTimeline": [
{ "date": "2026-02-24", "count": 5 },
{ "date": "2026-02-25", "count": 2 },
{ "date": "2026-03-25", "count": 8 }
],
"topRooms": [
{ "id": 3, "name": "team-standup-1234", "display_name": "Team Standup", "count": 58 },
{ "id": 7, "name": "product-demo-5678", "display_name": "Product Demo", "count": 31 }
]
}

Response Fields

kpis

Lifetime aggregate counts for the workspace.

FieldTypeDescription
roomsintegerTotal number of rooms in the workspace
recordingsintegerTotal number of recordings across all workspace rooms
recordingDurationintegerTotal recording duration in seconds across all rooms
contactsintegerTotal number of contacts in the workspace
bookingsintegerTotal number of booking events (event_type = 'booking')

activityTimeline

Daily activity for the last 30 days, combining bookings and room joins. Only days with at least one event appear — days with no activity are omitted.

FieldTypeDescription
datestringDate in YYYY-MM-DD format
bookingsintegerNumber of booking events on that day
room_joinsintegerNumber of room join events on that day

eventTypeBreakdown

Lifetime count of contact events grouped by type, ordered by count descending.

FieldTypeDescription
typestringEvent type (room_join, booking, etc.)
countintegerTotal number of events of this type

topBookingPages

Top 5 booking pages by number of booking events, lifetime.

FieldTypeDescription
idintegerBooking page ID
titlestringBooking page title
slugstringBooking page URL slug
countintegerNumber of bookings via this page

newContactsTimeline

Daily count of new contacts created in the last 30 days. Only days with at least one new contact appear.

FieldTypeDescription
datestringDate in YYYY-MM-DD format
countintegerNumber of new contacts created on that day

topRooms

Top 5 rooms by number of room_join events, lifetime.

FieldTypeDescription
idintegerRoom ID
namestringRoom slug
display_namestringRoom display name (may be null)
countintegerNumber of room join events in this room

Errors

StatusError
403Forbidden