Get statistics by Brand
/v1/email/stats/brandsconst { data } = await bird.email.stats.byBrand({
sort: "open_rate",
limit: 25,
});
for (const row of data) console.log(row.brand_id, row.engagement.open_rate);stats = client.email.stats.by_brand(sort="open_rate", limit=25)
for row in stats.data:
print(row)stats, err := client.Email.Stats.ByBrand(context.Background(), bird.EmailStatsByBrandParams{
Sort: "open_rate",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(stats.Data)$stats = $bird->email->stats->byBrand([
'sort' => 'open_rate',
'limit' => 25,
]);
foreach ($stats->getData() ?? [] as $row) {
echo $row->getBrandId(), ' ', $row->getEngagement()?->getOpenRate(), "\n";
}bird email stats by-brandcurl -X GET "https://us1.platform.bird.com/v1/email/stats/brands" \
-H "Authorization: Bearer $TOKEN" \
--url-query "sort=processed" \
--url-query "limit=50"{
"period": {
"from": "2026-10-01",
"to": "2026-10-30",
"data_as_of": null
},
"data": [
{
"brand_id": "bnd_01krdgeqcxet5s7t44vh8rt9mg",
"delivery": {
"processed": 14810,
"delivered": 14720,
"bounced": 90,
"bounces": {
"hard": 40,
"soft": 35,
"admin": 5,
"block": 8,
"undetermined": 2,
"hard_rate": 0.4444,
"soft_rate": 0.3889,
"admin_rate": 0.0556,
"block_rate": 0.0889,
"undetermined_rate": 0.0222
},
"complained": 3,
"deferred": 14,
"rejected": 10,
"oob_bounces": 2,
"effective_delivered": 14718,
"all_bounces": 92,
"oob_rate": 0.00014,
"delivery_rate": 0.9938,
"bounce_rate": 0.0062,
"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.1685,
"click_rate": 0.0422,
"unsubscribe_rate": 0.0008
},
"latency": {
"processing": {
"p50_ms": 24,
"p95_ms": 80,
"p99_ms": 140
},
"delivery": {
"p50_ms": null,
"p95_ms": null,
"p99_ms": null
},
"total": {
"p50_ms": 210,
"p95_ms": 620,
"p99_ms": 1100
}
}
}
],
"total": 2,
"next_cursor": null,
"prev_cursor": null,
"refresh_cursor": "eyJ2ZXJzaW9uIjoxfQ"
}
Returns aggregate delivery, engagement, and latency counts grouped by the Brand each message was sent with, so each Brand's deliverability and engagement can be compared side by side. Attribution uses the Brand recorded at send time. Archived Brands retain their historical activity keyed by their ID. Historical or unattributed messages recorded without a Brand appear in a separate row with brand_id set to null rather than being merged into the default Brand.
Rows are ranked by the sort metric (default processed) descending and paginated with the requested limit (default 50, hard maximum 200). Rows are computed against event time (not send time), so engagement received during the period for messages sent earlier is included. Preserve from, to, sort, and timezone when following next_cursor or prev_cursor; if the first request omitted from or to, pass the returned period.from and period.to on continuation so the cursor stays valid across local midnight.
This endpoint reads retained reporting events directly (data_as_of is null), covering up to the last 180 days starting on or after 2026-09-23T00:00:00Z. Requesting dates before the available history boundary returns 422 (E04072). When drilling down into a single Brand with POST /v1/email/stats/query, use local today or earlier for to (since POST /v1/email/stats/query rejects future calendar dates).
Query पैरामीटर
starting_afterstringCursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.
ending_beforestringCursor from the prev_cursor or refresh_cursor field of a previous list response. Returns items immediately before the cursor position in the current sort order. prev_cursor returns the preceding page. refresh_cursor anchors at the first row of that response, which on a newest-first sort is how to fetch the items that have appeared since.
fromstringInclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant (rounded down to a local quarter-hour). Use the same form for from and to, and use Z UTC instants when timezone is supplied. Defaults to 30 calendar days before to when both are omitted. Must fall within retained reporting history (last 180 days, on or after 2026-09-23T00:00:00Z).
tostringInclusive end of the window: a calendar day (YYYY-MM-DD, including the whole local day) or an RFC 3339 instant (rounded down to a local quarter-hour and including that quarter-hour). Must use the same form as from and not lie in the future for instant windows. Calendar windows allow up to 365 local days; instant windows allow up to 720 hours. Defaults to today in timezone when both are omitted.
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.
categorystringNot supported on breakdown endpoints. Supplying it returns 422. To compare categories, use GET /v1/email/stats/categories, or use POST /v1/email/stats/query to combine brand_id and category.
sortstringMetric to rank rows by, applied descending. Supports every count and rate defined by EmailStatsSortMetric; rows whose rate is undefined (zero denominator) sort last. Defaults to processed.
Possible values: processed, delivered, bounced, complained, deferred, rejected, oob_bounces, bounces.hard, bounces.soft, bounces.admin, bounces.block, bounces.undetermined, opens, opens_non_prefetched, unique_opens, unique_opens_non_prefetched, clicks, unique_clicks, unsubscribes, delivery_rate, bounce_rate, complaint_rate, open_rate, click_rate, unsubscribe_rate, bounces.hard_rate, bounces.soft_rate, bounces.admin_rate, bounces.block_rate, bounces.undetermined_rate
limitintegerMaximum number of Brand rows to return, ranked by the sort field descending.
Response Payload
periodThe resolved window the response covers (inclusive calendar dates in YYYY-MM-DD, or RFC 3339 starts of the first and last included 15-minute quarters), plus data_as_of (null because this breakdown reads retained reporting events directly).
dataBrand breakdown rows, ranked by the sort metric (default processed) descending. Includes a row with brand_id set to null when historical unbranded traffic occurred in the period.
चाइल्ड एट्रिब्यूट दिखाएँ
data.brand_idThe Brand recorded at send time (bnd_…, copyable from Brands > More actions > Copy brand ID in the dashboard). Archived Brands continue to appear keyed by their ID. null represents historical or unattributed messages sent without a Brand and is distinct from the workspace's default Brand.
data.deliveryDelivery counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). Lifecycle counts identify distinct recipients that reached the named stage in scope; oob_bounces counts distinct failure events. Period summaries count each identity once per metric across the whole window, so adding time-bucket distinct counts can overstate the summary. Event time determines attribution; send time does not. A recipient delivered on Monday counts in Monday's row. A recipient who bounced and then succeeded on a retry can appear in both bounced and delivered. Very large counts are close estimates rather than exact tallies.
These counts are successive lifecycle stages, so a recipient can appear in more than one:
rejected: Happens before any send attempt, from suppression, policy, or a generation failure.deferred: A temporary in-flight delay that is still being retried.bounced: A delivery failure, with its own hard, soft, admin, block, and undetermined sub-types.complained: Post-delivery spam feedback.
Each rate is a fraction and is null when its denominator is zero. delivery_rate and bounce_rate fall in the range 0 to 1, while event-time complaint_rate and oob_rate can exceed 1 when late signals outnumber attempts in a narrow window. accepted is reported only where it can be attributed (time buckets and the period summary). Breakdown rows omit it.
data.engagementEngagement counts and rates for the scope of the containing row (a time bucket, a breakdown dimension, or the whole period). opens, opens_non_prefetched and clicks count distinct engagement events (deduplicated occurrences). The unique_* fields count distinct recipients. unsubscribes counts distinct unsubscribe events. An event counts in the time bucket when it occurs, even if the message was sent in an earlier bucket. Counts are deduplicated with a scalable approximate counting method, so very large counts are close estimates rather than exact tallies. Each rate divides the counts in this scope and is null when its denominator is zero.
data.latencyLatency quantiles for this Brand. Retained reporting events populate processing and total quantiles; delivery quantiles are null.
चाइल्ड एट्रिब्यूट दिखाएँ
data.latency.processingApproximate p50, p95, and p99 latency percentiles in milliseconds for one latency family over the bucket. All three are null when no qualifying event contributed a measurement.
data.latency.deliveryApproximate p50, p95, and p99 latency percentiles in milliseconds for one latency family over the bucket. All three are null when no qualifying event contributed a measurement.
data.latency.totalApproximate p50, p95, and p99 latency percentiles in milliseconds for one latency family over the bucket. All three are null when no qualifying event contributed a measurement.
totalTotal number of distinct Brand groups with activity in the period (including the null unbranded group when present), regardless of limit. Pass next_cursor as starting_after to request the next page.
next_cursorCursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.
prev_cursorCursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.
refresh_cursorRefresh anchor, the first row of this response. Pass back as ending_before to fetch what precedes it in the current sort order. On a newest-first sort those are the items that have appeared since; on any other sort they are the items that sort earlier, so refreshing such a list means re-fetching it instead. Non-null whenever data is non-empty; null only on an empty page. Distinct from prev_cursor.
संबंधित संसाधन
इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।