Get mailbox email statistics
/v1/email/mailboxes/{mailbox_id}/statsconst stats = await bird.email.mailboxes.stats("mbx_01abc");
console.log(stats.summary?.sends_accepted);stats = client.email.mailboxes.stats("mbx_01krdgeqcxet5s7t44vh8rt9mg")
print(stats.summary)stats, err := client.Email.Mailboxes.Stats(context.Background(), "mbx_123", bird.EmailMailboxesStatsParams{})
if err != nil {
log.Fatal(err)
}
if stats.Summary != nil {
if d := stats.Summary.Delivery; d != nil {
fmt.Println(d.Delivered, d.Bounced)
}
}$stats = $bird->email->mailboxes->stats(
'mbx_01krdgeqcxet5s7t44vh8rt9mg',
['from' => '2026-05-01', 'to' => '2026-05-31'],
);
echo $stats->getSummary()?->getReceived();bird email mailboxes stats <mailbox-id>curl -X GET "https://us1.platform.bird.com/v1/email/mailboxes/{mailbox_id}/stats" \
-H "Authorization: Bearer $TOKEN" \
--url-query "granularity=day"{
"period": {
"from": "2026-05-01",
"to": "2026-05-31",
"grain": "day",
"data_as_of": "2026-05-25T14:03:10Z"
},
"summary": {
"sends_accepted": 231,
"delivery": {
"accepted": 14820,
"processed": 14810,
"delivered": 14720,
"bounced": 90,
"bounces": {
"hard": 12410,
"soft": 14290,
"admin": 410,
"block": 920,
"undetermined": 80,
"hard_rate": 0.454,
"soft_rate": 0.523,
"admin_rate": 0.015,
"block_rate": 0.0337,
"undetermined_rate": 0.0029
},
"complained": 3,
"deferred": 14,
"rejected": 10,
"oob_bounces": 2,
"effective_delivered": 14718,
"all_bounces": 92,
"oob_rate": 0.00014,
"delivery_rate": 0.9939,
"bounce_rate": 0.0061,
"complaint_rate": 0.0002
},
"engagement": {
"opens": 5420,
"opens_non_prefetched": 3210,
"unique_opens": 3640,
"unique_opens_non_prefetched": 2480,
"clicks": 924,
"unique_clicks": 621,
"unsubscribes": 12,
"open_rate": 0.1683,
"click_rate": 0.0422,
"unsubscribe_rate": 0.0009
},
"latency": {
"processing": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
},
"delivery": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
},
"total": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
}
},
"received": 519
},
"data": [
{
"bucket": "2026-07-21",
"sends_accepted": 12,
"delivery": {
"accepted": 14820,
"processed": 14810,
"delivered": 14720,
"bounced": 90,
"bounces": {
"hard": 12410,
"soft": 14290,
"admin": 410,
"block": 920,
"undetermined": 80,
"hard_rate": 0.454,
"soft_rate": 0.523,
"admin_rate": 0.015,
"block_rate": 0.0337,
"undetermined_rate": 0.0029
},
"complained": 3,
"deferred": 14,
"rejected": 10,
"oob_bounces": 2,
"effective_delivered": 14718,
"all_bounces": 92,
"oob_rate": 0.00014,
"delivery_rate": 0.9939,
"bounce_rate": 0.0061,
"complaint_rate": 0.0002
},
"engagement": {
"opens": 5420,
"opens_non_prefetched": 3210,
"unique_opens": 3640,
"unique_opens_non_prefetched": 2480,
"clicks": 924,
"unique_clicks": 621,
"unsubscribes": 12,
"open_rate": 0.1683,
"click_rate": 0.0422,
"unsubscribe_rate": 0.0009
},
"latency": {
"processing": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
},
"delivery": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
},
"total": {
"p50_ms": 420,
"p95_ms": 1820,
"p99_ms": 4920
}
},
"received": 34
}
]
}
Returns the mailbox's sent and received email statistics over a time window: a period-wide summary plus a bucketed series. Sent-mail metrics have the same delivery, engagement, and latency breakdowns as the email stats endpoints. received counts mail that arrived at the mailbox.
Rows are bucketed by the time the event happened rather than the time the message was sent, so engagement that arrived during the period for a message sent earlier is counted here. Statistics start when the mailbox starts sending and receiving; the mailbox's all-time message_count and thread_count live on the mailbox resource itself.
from and to accept either calendar days (YYYY-MM-DD, day granularity only) or RFC 3339 instants (hour granularity only). Both bounds must use the same form. Window caps depend on granularity: 365 days at day, 30 days at hour. Set timezone to report in a local zone instead of UTC.
Paramètres
mailbox_idstringMailbox identifier. Starts with mbx_.
Paramètres de requête
fromstringInclusive start of the window: a calendar day (YYYY-MM-DD, day granularity only) or an RFC 3339 instant rounded down to the hour (hour granularity only). Interpreted in timezone, or in UTC when timezone is omitted. A numeric UTC offset is rejected when timezone is set; use a calendar day or a Z (UTC) instant. Must use the same form as to. Defaults to 30 days before to at day granularity and 7 days before to at hour, when omitted.
tostringInclusive end of the window: a calendar day (YYYY-MM-DD, day granularity only) or an RFC 3339 instant rounded down to the hour (hour granularity only). Interpreted in timezone, or in UTC when timezone is omitted. A numeric UTC offset is rejected when timezone is set; use a calendar day or a Z (UTC) instant. Must use the same form as from. Defaults to today (day) or the current hour (hour) in that timezone when omitted. Window may not exceed 365 days at day or 30 days at hour granularity.
timezonestringIANA timezone identifier used to group statistics, for example Asia/Kathmandu. The default is UTC. Day and hour boundaries, including the default window when from and to are omitted, follow this timezone. When this parameter is set, pass from and to as calendar days or Z instants instead of timestamps with explicit UTC offsets.
granularitystringGranularity of the series: day (default) or hour. Echoed back as period.grain.
Possible values: day, hour
Contenu de la réponse
periodThe window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
summarySingle-row aggregate of the mailbox's email activity across the full requested period. Counts use each field's message, recipient, or event identity across the whole window. Repeat opens, clicks, and unsubscribes from the same recipient contribute as separate events; unique engagement fields count distinct recipients. Adding per-bucket distinct counts can overstate the summary. Latency percentiles are computed across the whole period. Rates are null when their denominator is zero.
dataOne row per bucket in the period, in chronological order. Buckets with no activity are included with zero counts.
Afficher les attributs enfants
data.bucketThe day (YYYY-MM-DD) or instant (RFC 3339, on the bucket boundary) this point covers, matching the period's grain.
data.sends_acceptedDistinct email messages the mailbox sent that were accepted in this bucket, counted at the message level (one per accepted send regardless of how many recipients it addresses). Every other sent-mail metric in delivery and engagement is recipient-level or event-level.
data.deliverydata.engagementdata.latencydata.receivedDistinct emails the mailbox received in this bucket.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.