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.
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.
| Field | Type | Description |
|---|---|---|
rooms | integer | Total number of rooms in the workspace |
recordings | integer | Total number of recordings across all workspace rooms |
recordingDuration | integer | Total recording duration in seconds across all rooms |
contacts | integer | Total number of contacts in the workspace |
bookings | integer | Total 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.
| Field | Type | Description |
|---|---|---|
date | string | Date in YYYY-MM-DD format |
bookings | integer | Number of booking events on that day |
room_joins | integer | Number of room join events on that day |
eventTypeBreakdown
Lifetime count of contact events grouped by type, ordered by count descending.
| Field | Type | Description |
|---|---|---|
type | string | Event type (room_join, booking, etc.) |
count | integer | Total number of events of this type |
topBookingPages
Top 5 booking pages by number of booking events, lifetime.
| Field | Type | Description |
|---|---|---|
id | integer | Booking page ID |
title | string | Booking page title |
slug | string | Booking page URL slug |
count | integer | Number 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.
| Field | Type | Description |
|---|---|---|
date | string | Date in YYYY-MM-DD format |
count | integer | Number of new contacts created on that day |
topRooms
Top 5 rooms by number of room_join events, lifetime.
| Field | Type | Description |
|---|---|---|
id | integer | Room ID |
name | string | Room slug |
display_name | string | Room display name (may be null) |
count | integer | Number of room join events in this room |
Errors
| Status | Error |
|---|---|
403 | Forbidden |