Campaign Stats
Retrieve aggregated performance metrics for a campaign
Retrieve campaign statistics
Returns aggregated performance metrics for a single campaign: counts and rates for deliveries, opens, clicks, bounces, spam complaints, and unsubscriptions.
If the campaign has never been started, all counts and rates are returned as 0. Statistics are aggregated asynchronously and may be slightly delayed for recently sent campaigns.
By default, statistics are aggregated over the whole period since the campaign was last started. Use the optional start_date and end_date query parameters to narrow the aggregation window.
Pass the API token in the Api-Token header
Unique identifier of the email campaign
4567Start of the aggregation window (inclusive), in YYYY-MM-DD format. Defaults to the day
the campaign was last started. Values earlier than the account creation date are clamped
to it.
2026-05-01End of the aggregation window (inclusive), in YYYY-MM-DD format. Defaults to the current date.
2026-05-31Aggregated campaign statistics.
Authentication failed — missing or invalid API token.
The API token does not have permission to access this resource.
The requested email campaign was not found.
Too many requests. The public API is rate limited to 150 requests per 10 seconds per
API token. Retry after the window resets (see the x-ratelimit-reset header).
curl -X GET "https://mailtrap.io/api/email_campaigns/4567/stats?start_date=2026-05-01&end_date=2026-05-31" \
-H 'Api-Token: YOUR_API_KEY'
{
"data": {
"delivery_count": 1450,
"delivery_rate": 0.9667,
"bounce_count": 30,
"bounce_rate": 0.02,
"open_count": 820,
"open_rate": 0.5655,
"click_count": 310,
"click_rate": 0.2138,
"spam_count": 5,
"spam_rate": 0.0033,
"unsubscription_count": 12,
"unsubscription_rate": 0.0083,
"sent_count": 1500
}
}Last updated
Was this helpful?

