Analytics

5 endpoints

GET/api/analytics/bounce-reportauth required

Get bounce report

Returns bounce analytics broken down by reason and provider for a date range. Defaults to the last 30 days.

Parameters
NameInTypeRequiredDescription
fromquerystring (date-time)optionalStart of the date range (ISO 8601). Defaults to 30 days ago.
toquerystring (date-time)optionalEnd of the date range (ISO 8601). Defaults to now.
Responses
200Bounce report with breakdowns by reason and provider.
FieldTypeRequiredDescription
totalBouncesnumberrequired
bouncesByReasonobject[]required
bouncesByProviderobject[]required
401Unauthorized
500Internal server error
GET/api/analytics/delivery-reportauth required

Get delivery report

Returns delivery analytics with daily stats and provider breakdown for a date range. Defaults to the last 30 days.

Parameters
NameInTypeRequiredDescription
fromquerystring (date-time)optionalStart of the date range (ISO 8601). Defaults to 30 days ago.
toquerystring (date-time)optionalEnd of the date range (ISO 8601). Defaults to now.
Responses
200Delivery report with daily stats and provider breakdown.
FieldTypeRequiredDescription
dailyStatsobject[]required
providerBreakdownobject[]required
401Unauthorized
500Internal server error
GET/api/analytics/stats/{emailId}auth required

Get stats for a specific email

Returns event-level analytics (opens, clicks, bounces, etc.) for a single email by its ID.

Parameters
NameInTypeRequiredDescription
emailIdpathstringrequiredThe ID of the email to retrieve stats for.
Responses
200Email stats including all tracked events.
FieldTypeRequiredDescription
emailIdstringrequired
eventsobject[]required
401Unauthorized
404Email not found
500Internal server error
GET/api/analytics/summaryauth required

Get analytics summary

Returns aggregated analytics metrics (sent, delivered, opened, clicked, bounced) for a date range. Defaults to the last 30 days.

Parameters
NameInTypeRequiredDescription
fromquerystring (date-time)optionalStart of the date range (ISO 8601). Defaults to 30 days ago.
toquerystring (date-time)optionalEnd of the date range (ISO 8601). Defaults to now.
Responses
200Analytics summary for the requested date range.
FieldTypeRequiredDescription
totalSentnumberrequired
totalDeliverednumberrequired
totalOpenednumberrequired
totalClickednumberrequired
totalBouncednumberrequired
deliveryRatenumberrequired
openRatenumberrequired
clickRatenumberrequired
bounceRatenumberrequired
401Unauthorized
500Internal server error
POST/api/analytics/trackauth required

Track an analytics event

Records an analytics event (open, click, bounce, etc.) for a specific email. Used by webhooks and pixel trackers.

Request Bodyrequired
FieldTypeRequiredDescription
emailIdstringrequired
typestringrequired
recipientstringoptional
providerstringoptional
urlstringoptional
reasonstringoptional
metadataobjectoptional
Responses
200Event tracked successfully.
FieldTypeRequiredDescription
successbooleanrequired
400Invalid request body
401Unauthorized
500Internal server error