Endpoints
| Method | Path | Description |
|---|---|---|
| GET | /v1/analytics/comms/delivery-events | Channel + event counts for outbound delivery events. |
| GET | /v1/analytics/comms/notification-sends | Notification send counts grouped by channel and status. |
| GET | /v1/analytics/comms/dispatch-status | Dispatch status histogram across campaigns. |
| GET | /v1/analytics/bookings/amounts | Booking amounts grouped by event (created, cancelled, etc.). |
| GET | /v1/analytics/bookings/destinations | Booking revenue by destination country. |
| GET | /v1/analytics/bookings/categories | Booking revenue by product category. |
| GET | /v1/analytics/bookings/pax | Passenger totals per day. |
| GET | /v1/analytics/payments/summary | Payment totals by provider and status. |
All analytics routes require the
analytics:read scope and three query parameters: from, to, and workspaceId. Dates are inclusive (UTC); the API expands them to full-day windows when querying ClickHouse.Key concepts
- Responses are JSON arrays validated against the ClickHouse schemas defined in
@workspace/types. Each object includes adayfield (ISO date) plus metric-specific fields (cnt,amount_cents_sum, etc.). - The API does not paginate; ensure your requested date range is appropriate for dashboard queries (typically 90 days or less).
- Use the same workspace ID your API key maps to. For multi-workspace service accounts, switching
workspaceIdlets you build cross-workspace dashboards. - Metrics return raw cents for revenue totals (
amount_cents_sum). Convert to currency units in your analytics layer.