---
title: "List the best-performing campaigns"
method: GET
path: "/api/v1/analytics/top-campaigns"
tags: ["Analytics"]
---

# List the best-performing campaigns

`GET /api/v1/analytics/top-campaigns`

## Request

- Base URL: `https://api.sendly.now`
- URL: `https://api.sendly.now/api/v1/analytics/top-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`)

Campaigns sent in the window, ranked by open rate, capped at 50 rows. Not cursor-paginated: a leaderboard is a top-N by definition, and paging one would mean re-ranking on every page.

`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.
- `limit` integer

## Response `200`

Ranked campaigns

- AnalyticsTopCampaignsV1: Sent campaigns ranked by open rate.
  - `data` object[], required
    - `click_rate` number, required
    - `clicked` integer, required
    - `id` string, uuid, required
    - `open_rate` number, required
    - `opened` integer, required
    - `sent` integer, required
    - `subject` string, 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)
