Retrieve event counts
Per-name event counts over a bounded window, most frequent first.
The window defaults to the last 30 days and never reaches further back than 90: this is a GROUP BY over the highest-volume table in the system, and an all-time answer is not one it can keep giving at scale. A wider request is narrowed rather than refused, and the window field states the range actually covered.
Requires the events:read scope — View the custom events your application has recorded.
AuthorizationBearer <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.
date-timeto?|End of the window (ISO 8601). Defaults to now.
date-timeEvent counts
application/json- response
Per-name event counts over the applied window.
data*array<>window*The time range this response was computed over, after the 90-day clamp.
curl -X GET 'https://api.sendly.now/api/v1/events/stats'{ "data": [ { "name": "string", "count": 0 } ], "window": { "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z" }}