> ## Documentation Index
> Fetch the complete documentation index at: https://docs.voyantcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Analytics API

> Fetch aggregated ClickHouse metrics for communications, bookings, and payments.

## 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.                       |

<Info>
  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.
</Info>

## Key concepts

* Responses are JSON arrays validated against the ClickHouse schemas defined in `@workspace/types`. Each object includes a `day` field (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 `workspaceId` lets you build cross-workspace dashboards.
* Metrics return raw cents for revenue totals (`amount_cents_sum`). Convert to currency units in your analytics layer.
