Skip to Content
SendlySendly
API ReferenceAnalytics

List the best-performing campaigns

GET
/api/v1/analytics/top-campaigns

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.

headerAuthorizationBearer <API Key>

API key authentication. Use a sk_* (FULL) or pk_* (SENDING_ONLY) key as the bearer token. Public keys (pk_*) are restricted to the email-send endpoints and the self-serve list subscribe/unsubscribe pair; every other endpoint — event tracking included — answers 403 for them. In scope terms (used by /api/v1/* operations): FULL keys hold every scope; SENDING_ONLY keys hold only emails:send.

from?|

Start of the window (ISO 8601). Defaults to 30 days ago; clamped to at most 90 days back.

Formatdate-time
to?|

End of the window (ISO 8601). Defaults to now.

Formatdate-time
limit?integer
Range1 <= value <= 50
Default10

Response Body

Ranked campaigns

application/json
  1. response

Sent campaigns ranked by open rate.

data*array<>
window*

The time range this response was computed over, after the 90-day clamp.

Example Request
curl -X GET 'https://api.sendly.now/api/v1/analytics/top-campaigns'
Example Response
{  "data": [    {      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "subject": "string",      "sent": 0,      "opened": 0,      "clicked": 0,      "open_rate": 0,      "click_rate": 0    }  ],  "window": {    "from": "2019-08-24T14:15:22Z",    "to": "2019-08-24T14:15:22Z"  }}