Analytics API
Query email delivery statistics, per-flow performance metrics, top flows, and recent activity. Export data as CSV for reporting.
For a user guide on analytics dashboards, see Analytics.
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/analytics/summary | Dashboard summary stats |
GET | /v1/analytics/flows/{id}/stats | Per-flow performance |
GET | /v1/analytics/flows/top | Top flows by metric |
GET | /v1/analytics/emails | Email stats by date |
GET | /v1/analytics/recent-activity | Recent activity feed |
GET | /v1/analytics/export | CSV export |
Auth: All endpoints require JWT authentication and analytics:read permission (except export, which requires analytics:export).
Dashboard Summary
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
from_date | datetime | -- | Start date (ISO 8601) |
to_date | datetime | -- | End date (ISO 8601) |
compare | boolean | false | Include comparison to previous period |
Response
Per-Flow Stats
Response
Top Flows
Return the highest-performing flows ranked by a metric.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 5 | Number of flows to return (1--50) |
sort_by | string | emails_sent | Metric to rank by |
from_date | datetime | -- | Start date (ISO 8601) |
to_date | datetime | -- | End date (ISO 8601) |
Response
Email Stats by Date
Return daily email statistics aggregated by date.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
from_date | datetime | -- | Start date (ISO 8601) |
to_date | datetime | -- | End date (ISO 8601) |
Response
This endpoint returns aggregated daily statistics, not individual email log records. For individual email delivery records, use the Email Logs page in the dashboard or the /v1/email-logs endpoint.
Recent Activity
Return the most recent activity events for the workspace.
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
limit | integer | 10 | Number of items to return |
CSV Export
Export email analytics as a CSV download.
Auth: JWT. Requires analytics:export permission.
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
from_date | datetime | No | Start date (ISO 8601) |
to_date | datetime | No | End date (ISO 8601) |
Response
Returns a CSV file with Content-Type: text/csv and Content-Disposition: attachment headers.
Analytics data is updated from materialized views that refresh every 15 minutes. There may be a short delay between email delivery and stats appearing in the API.
Metrics Reference
| Metric | Calculation |
|---|---|
| Delivery Rate | Delivered / Sent * 100 |
| Open Rate | Opened / Delivered * 100 |
| Click-Through Rate | Clicked / Delivered * 100 |
| Bounce Rate | Bounced / Sent * 100 |
| Suppressed | Emails not sent due to required NLT fields being null |