Analytics
5 endpoints
GET
/api/analytics/bounce-reportauth requiredGet bounce report
Returns bounce analytics broken down by reason and provider for a date range. Defaults to the last 30 days.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | string (date-time) | optional | Start of the date range (ISO 8601). Defaults to 30 days ago. |
| to | query | string (date-time) | optional | End of the date range (ISO 8601). Defaults to now. |
Responses
200Bounce report with breakdowns by reason and provider.
| Field | Type | Required | Description |
|---|---|---|---|
| totalBounces | number | required | |
| bouncesByReason | object[] | required | |
| bouncesByProvider | object[] | required |
401Unauthorized
500Internal server error
GET
/api/analytics/delivery-reportauth requiredGet delivery report
Returns delivery analytics with daily stats and provider breakdown for a date range. Defaults to the last 30 days.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | string (date-time) | optional | Start of the date range (ISO 8601). Defaults to 30 days ago. |
| to | query | string (date-time) | optional | End of the date range (ISO 8601). Defaults to now. |
Responses
200Delivery report with daily stats and provider breakdown.
| Field | Type | Required | Description |
|---|---|---|---|
| dailyStats | object[] | required | |
| providerBreakdown | object[] | required |
401Unauthorized
500Internal server error
GET
/api/analytics/stats/{emailId}auth requiredGet stats for a specific email
Returns event-level analytics (opens, clicks, bounces, etc.) for a single email by its ID.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| emailId | path | string | required | The ID of the email to retrieve stats for. |
Responses
200Email stats including all tracked events.
| Field | Type | Required | Description |
|---|---|---|---|
| emailId | string | required | |
| events | object[] | required |
401Unauthorized
404Email not found
500Internal server error
GET
/api/analytics/summaryauth requiredGet analytics summary
Returns aggregated analytics metrics (sent, delivered, opened, clicked, bounced) for a date range. Defaults to the last 30 days.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| from | query | string (date-time) | optional | Start of the date range (ISO 8601). Defaults to 30 days ago. |
| to | query | string (date-time) | optional | End of the date range (ISO 8601). Defaults to now. |
Responses
200Analytics summary for the requested date range.
| Field | Type | Required | Description |
|---|---|---|---|
| totalSent | number | required | |
| totalDelivered | number | required | |
| totalOpened | number | required | |
| totalClicked | number | required | |
| totalBounced | number | required | |
| deliveryRate | number | required | |
| openRate | number | required | |
| clickRate | number | required | |
| bounceRate | number | required |
401Unauthorized
500Internal server error
POST
/api/analytics/trackauth requiredTrack an analytics event
Records an analytics event (open, click, bounce, etc.) for a specific email. Used by webhooks and pixel trackers.
Request Bodyrequired
| Field | Type | Required | Description |
|---|---|---|---|
| emailId | string | required | |
| type | string | required | |
| recipient | string | optional | |
| provider | string | optional | |
| url | string | optional | |
| reason | string | optional | |
| metadata | object | optional |
Responses
200Event tracked successfully.
| Field | Type | Required | Description |
|---|---|---|---|
| success | boolean | required |
400Invalid request body
401Unauthorized
500Internal server error