---
title: "Retrieve campaign totals and engagement"
method: GET
path: "/api/v1/analytics/campaigns"
tags: ["Analytics"]
---

# Retrieve campaign totals and engagement

`GET /api/v1/analytics/campaigns`

## Request

- Base URL: `https://api.sendly.now`
- URL: `https://api.sendly.now/api/v1/analytics/campaigns`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `better-auth.session_token`
  - OAuth 2 (authorization code, authorization URL `https://app.sendly.now/api/auth/oauth2/authorize`, token URL `https://app.sendly.now/api/auth/oauth2/token`, scopes: `analytics:read`)

Campaign counts plus average open and click rates.

`total` and `active` count campaigns CREATED in the window; `completed` counts campaigns SENT in it — so a campaign created earlier and sent inside the window appears only in `completed`. Rates are percentages to one decimal place, averaged over the campaigns sent in the window.

`from` defaults to 30 days ago and is clamped to at most 90 days back; `to` defaults to now. A wider request is narrowed rather than refused, and the `window` field states the range actually covered — read it before comparing two responses.

Requires the `analytics:read` scope — View your sending analytics and engagement metrics.

## Query parameters

- `from` string, date-time, nullable: Start of the window (ISO 8601). Defaults to 30 days ago; clamped to at most 90 days back.
- `to` string, date-time, nullable: End of the window (ISO 8601). Defaults to now.

## Response `200`

Campaign statistics

- AnalyticsCampaignStatsV1: Campaign counters and engagement over the window.
  - `active` integer, required: Campaigns in DRAFT or SCHEDULED.
  - `average_click_rate` number, required
  - `average_open_rate` number, required: Percentage, one decimal place.
  - `completed` integer, required
  - `total` integer, required
  - `window` AnalyticsWindowV1, required: The time range this response was computed over, after the 90-day clamp.
    - `from` string, date-time, required
    - `to` string, date-time, required

## Other responses

- `401`: `invalid_api_key` or `invalid_session` — missing or invalid credentials.
- `403`: `scope_missing`, `project_access_denied`, or `project_disabled`.
- `422`: `validation_error` — query, path, or body parameters did not match the schema.
- `429`: `rate_limited` — see `Retry-After` and the `RateLimit` headers.
- `500`: `internal_error`.

---

[API](https://skmtc.dev/sendly/apis/sendly-api.md) · [All operations](https://skmtc.dev/sendly/apis/sendly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/sendly/apis/sendly-api/revisions/ce7cfb7f7c7e?raw)
