Retrieve Metrics
Retrieve account-level email metrics.
All parameters are optional. With none, the response covers the last 7 days
(today plus the 6 previous days), includes every metric, and returns only
totals.
Query Parameters
Section titled “Query Parameters”List-type query parameters below accept a comma-separated value, the
parameter repeated (domain_id=a&domain_id=b), or a mix of
both.
-
start_date(string) — The start of the date range, as an ISO 8601 date (2026-07-01) or datetime (2026-07-01T00:00:00Z). Must be on or beforeend_date, and can equal it to query a single day. Defaults to 6 days beforeend_date. -
end_date(string) — The end of the date range, as an ISO 8601 date or datetime. Values in the future are clamped to the current time. Defaults to now. -
timezone(string) — The IANA timezone (e.g.America/New_York) used to bucket periods whenperiodis indimensions. -
granularity(hourly | daily | weekly | monthly) — The bucket size used whenperiodis indimensions. Accepted but has no effect otherwise. The date range can't produce more than 10,000 periods at the chosen granularity. This limit only applies whenperiodis indimensions. -
metrics(string[]) — List of metrics to include in the response. Omit for all. See Metrics. -
dimensions(string[]) — List of dimensions to break the response down by. Combine any ofperiod,domain,email, orbroadcastto group the data by more than one at once, exceptemailcannot be combined withbroadcast. Omit for a singletotalsrow for the whole range, with nodata.Possible values:
period: groups the data bygranularityperiod, in chronological order.domain: groups the data by sending domain.email: groups the data by email. Cannot be combined withbroadcast.broadcast: groups the data by broadcast. Cannot be combined withemail.
-
domain_id(string[]) — List of sending domain IDs to restrict the response to, up to 100. -
email_id(string[]) — List of email IDs to restrict the response to, up to 100. Cannot be combined with thebroadcastdimension orbroadcast_id. -
broadcast_id(string[]) — List of broadcast IDs to restrict the response to, up to 100. Cannot be combined with theemaildimension oremail_id.
Metrics
Section titled “Metrics”| Metric | Description |
|---|---|
received |
Emails Resend accepted for processing. |
sent |
Emails sent to the recipient's mail server. |
delivered |
Emails the recipient's mail server accepted. |
delivery_delayed |
Delivery postponed by a temporary issue. Not final. |
failed |
Emails that never reached a mail server. |
suppressed |
Skipped because the recipient is suppressed. |
bounced |
All bounces, summing the three below. |
bounced_transient |
Soft bounce. Temporary, so a later send can succeed. |
bounced_permanent |
Hard bounce. Permanent, and the address is suppressed. |
bounced_undetermined |
Bounce with no classifiable reason. |
opened |
Open events, including repeats. |
unique_opened |
Emails opened at least once. |
clicked |
Link click events, including repeats. |
unique_clicked |
Emails clicked at least once. |
complained |
Delivered emails marked as spam. |
unsubscribed |
Recipients who unsubscribed. |
delivery_rate |
delivered / sent |
open_rate |
unique_opened / delivered |
click_rate |
unique_clicked / delivered |
bounce_rate |
bounced / sent |
complaint_rate |
complained / delivered |
unsubscribe_rate |
unsubscribed / delivered |
import { Resend } from 'resend';
const resend = new Resend('re_xxxxxxxxx');
const { data } = await resend.emails.metrics({
startDate: '2026-07-01',
endDate: '2026-07-08',
metrics: ['sent', 'delivered', 'open_rate'],
dimensions: ['period', 'broadcast'],
broadcastId: ['5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a'],
});import resend
resend.api_key = "re_xxxxxxxxx"
params: resend.Emails.MetricsParams = {
"start_date": "2026-07-01",
"end_date": "2026-07-08",
"metrics": ["sent", "delivered", "open_rate"],
"dimensions": ["period", "broadcast"],
"broadcast_id": ["5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a"],
}
metrics = resend.Emails.metrics(params)
print(metrics)require "resend"
Resend.api_key = "re_xxxxxxxxx"
params = {
start_date: "2026-07-01",
end_date: "2026-07-08",
metrics: ["sent", "delivered", "open_rate"],
dimensions: ["period", "broadcast"],
broadcast_id: ["5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a"]
}
metrics = Resend::Emails.metrics(params)
puts metricspackage main
import (
"context"
"fmt"
"github.com/resend/resend-go/v4"
)
func main() {
ctx := context.TODO()
client := resend.NewClient("re_xxxxxxxxx")
startDate := "2026-07-01"
endDate := "2026-07-08"
metrics, err := client.Emails.MetricsWithOptions(ctx, &resend.MetricsOptions{
StartDate: &startDate,
EndDate: &endDate,
Metrics: []resend.MetricName{
resend.MetricSent,
resend.MetricDelivered,
resend.MetricOpenRate,
},
Dimensions: []resend.MetricsDimension{
resend.MetricsDimensionPeriod,
resend.MetricsDimensionBroadcast,
},
BroadcastId: []string{"5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a"},
})
if err != nil {
panic(err)
}
fmt.Println(metrics.Totals)
}use resend_rs::types::{GetEmailMetricsOptions, Metric};
use resend_rs::{Resend, Result};
#[tokio::main]
async fn main() -> Result<()> {
let resend = Resend::new("re_xxxxxxxxx");
let options = GetEmailMetricsOptions::default()
.with_start_date("2026-07-01")
.with_end_date("2026-07-08")
.with_metrics([Metric::Sent, Metric::Delivered, Metric::OpenRate])
.with_period_dimension()
.with_broadcast_dimension()
.with_broadcast_id("5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a");
let _metrics = resend.emails.metrics(options).await?;
Ok(())
}import com.resend.Resend;
import com.resend.core.exception.ResendException;
import com.resend.services.emails.model.*;
public class Main {
public static void main(String[] args) throws ResendException {
Resend resend = new Resend("re_xxxxxxxxx");
GetEmailsMetricsOptions options = GetEmailsMetricsOptions.builder()
.startDate("2026-07-01")
.endDate("2026-07-08")
.metrics(MetricName.SENT, MetricName.DELIVERED, MetricName.OPEN_RATE)
.dimensions(MetricsDimension.PERIOD, MetricsDimension.BROADCAST)
.broadcastIds("5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a")
.build();
EmailsMetricsResponse metrics = resend.emails().metrics(options);
}
}using Resend;
IResend resend = ResendClient.Create( "re_xxxxxxxxx" );
var resp = await resend.EmailMetricsAsync( new EmailMetricsQuery()
{
StartDate = new DateTime( 2026, 7, 1 ),
EndDate = new DateTime( 2026, 7, 8 ),
Metrics = new List<MetricType> { MetricType.Sent, MetricType.Delivered, MetricType.OpenRate },
Dimensions = new List<MetricDimension> { MetricDimension.Period, MetricDimension.Broadcast },
BroadcastId = new List<Guid> { Guid.Parse( "5a5a3b1e-3b1a-4b1a-8b1a-3b1a4b1a8b1a" ) },
} );
Console.WriteLine( "Totals={0}", resp.Content?.Totals );curl -X GET 'https://api.resend.com/emails/metrics?start_date=2026-07-01&end_date=2026-07-08&metrics=sent,delivered,open_rate&dimensions=period,domain' \
-H 'Authorization: Bearer re_xxxxxxxxx'{
"object": "metrics",
"start_date": "2026-07-01T00:00:00.000Z",
"end_date": "2026-07-08T00:00:00.000Z",
"metrics": ["sent", "delivered", "open_rate"],
"dimensions": ["period", "domain"],
"granularity": "daily",
"totals": {
"sent": 1204,
"delivered": 1180,
"open_rate": 50.0
},
"data": [
{
"period": "2026-07-01",
"domain_id": "d91cd9bd-1176-4f47-2a4b-fce2d5399cbf",
"domain_name": "example.com",
"sent": 172,
"delivered": 169,
"open_rate": 49.7
}
]
}