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

# Analytics API

> Message analytics, deliverability, scheduled reports, and conversion goals. All reads served from a read-replica.

# Analytics API

Aggregated analytics over message traffic, deliverability, costs, and goal conversions. All read endpoints are served from a database read-replica, so they're cheap to call but lag the primary by 1-3 seconds.

**Base path:** `/api/v1/analytics`

**Authentication:** API key (`X-API-Key`) or session JWT.

## Message analytics

| Method | Path                                    | Purpose                                       |
| ------ | --------------------------------------- | --------------------------------------------- |
| `GET`  | `/api/v1/analytics/messages`            | Message volume, status breakdown, time series |
| `GET`  | `/api/v1/analytics/messages/by-channel` | Volume per channel                            |
| `GET`  | `/api/v1/analytics/messages/by-country` | Volume per destination country                |
| `GET`  | `/api/v1/analytics/messages/errors`     | Error-code rollup                             |
| `GET`  | `/api/v1/analytics/costs`               | Cost per channel / country / day              |
| `GET`  | `/api/v1/analytics/deliverability`      | Delivery, read, click rates                   |

## Scheduled reports

Email-delivered analytics rollups on a schedule.

| Method   | Path                                                | Purpose                    |
| -------- | --------------------------------------------------- | -------------------------- |
| `GET`    | `/api/v1/analytics/scheduled-reports`               | List                       |
| `POST`   | `/api/v1/analytics/scheduled-reports`               | Create                     |
| `PATCH`  | `/api/v1/analytics/scheduled-reports/{id}`          | Update                     |
| `DELETE` | `/api/v1/analytics/scheduled-reports/{id}`          | Delete                     |
| `POST`   | `/api/v1/analytics/scheduled-reports/{id}/send-now` | Trigger an out-of-band run |

## Conversion goals

A **goal** is a tracked conversion (signup, purchase, trial start, etc.). Hits are recorded server-side via `record`, or via the `/g/:goalId/:contactId.gif` tracking pixel for browser conversion attribution.

| Method   | Path                                       | Purpose                             |
| -------- | ------------------------------------------ | ----------------------------------- |
| `GET`    | `/api/v1/analytics/goals/`                 | List goals                          |
| `POST`   | `/api/v1/analytics/goals/`                 | Create a goal                       |
| `GET`    | `/api/v1/analytics/goals/{id}`             | Get a goal                          |
| `PATCH`  | `/api/v1/analytics/goals/{id}`             | Update                              |
| `DELETE` | `/api/v1/analytics/goals/{id}`             | Delete                              |
| `POST`   | `/api/v1/analytics/goals/{id}/record`      | Record a conversion server-side     |
| `GET`    | `/api/v1/analytics/goals/{id}/conversions` | List conversions                    |
| `GET`    | `/api/v1/analytics/goals/{id}/stats`       | Conversion rate, attribution rollup |

## See also

* [Webhooks → analytics events](/webhooks/events)
