Sign inGet Started

Get statistics by Brand

GET
/v1/email/stats/brands
const { 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);
Réponse200
{
  "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).

Paramètres de requête

starting_afterstring

Cursor from the next_cursor field of a previous list response. Returns items immediately after the cursor position in the current sort order.

ending_beforestring

Cursor 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.

fromstring

Inclusive 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).

tostring

Inclusive 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.

timezonestring

IANA 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.

categorystring

Not 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.

sortstring

Metric 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

limitinteger

Maximum number of Brand rows to return, ranked by the sort field descending.

Contenu de la réponse

period
object
obligatoire

The 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).

Afficher les attributs enfants
data
array of object
obligatoire

Brand 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.

Afficher les attributs enfants
data.brand_id
nullable string
obligatoire

The 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.delivery
object
obligatoire

Delivery 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.

Afficher les attributs enfants
data.delivery.accepted
integer

Distinct recipients accepted for delivery after suppression filtering. Reported on time buckets and the period summary. Breakdown rows leave it out, because their rollups do not have it.

data.delivery.processed
integer
obligatoire

Distinct recipients whose message was processed and handed off for delivery.

data.delivery.delivered
integer
obligatoire

Distinct recipients whose message the receiving mail server accepted.

data.delivery.bounced
integer
obligatoire

Distinct recipients whose delivery failed. This is approximately the sum of the five bounces.* sub-counts (hard, soft, admin, block, undetermined). The two totals are worked out independently, so they can differ slightly.

data.delivery.bounces
object
obligatoire

Breakdown of bounced by failure type, with each rate as a fraction of bounced. Counts are distinct bounced recipients of that type; the five types approximately partition bounced, so the five rates sum to roughly 1.0 when bounced is non-zero.

Afficher les attributs enfants
data.delivery.complained
integer
obligatoire

Distinct recipients who reported the message as spam via a feedback loop.

data.delivery.deferred
integer
obligatoire

Distinct recipients whose delivery the receiving server temporarily delayed and is still being retried.

data.delivery.rejected
integer
obligatoire

Distinct recipients rejected before any delivery attempt. Includes recipients on the workspace suppression list, transmissions that could not be completed, message-generation failures, and recipients refused by sending policy. The per-recipient rejection_reason field on GET /v1/email/messages/{message_id}/recipients surfaces the specific cause.

data.delivery.oob_bounces
integer
obligatoire

Out-of-band bounce events: distinct failure notifications received after the receiving server had initially confirmed delivery. The count represents deduplicated events rather than unique recipients.

data.delivery.effective_delivered
integer
obligatoire

Recipients who remain delivered after all bounce signals resolve, computed as delivered - oob_bounces. Use this as the base for engagement-rate denominators. Clamped to 0 when oob_bounces exceeds delivered.

data.delivery.all_bounces
integer
obligatoire

Total recipients in this scope who did not receive the message, computed as bounced + oob_bounces.

data.delivery.oob_rate
nullable number
obligatoire

Out-of-band bounce events in this scope relative to delivery attempts, computed as oob_bounces / (delivered + bounced). Because out-of-band bounces are attributed by event time as distinct events, a scope can record more of them than it attempted, pushing the rate above 1. Null when there were no attempts.

data.delivery.delivery_rate
nullable number
obligatoire

Share of this scope's delivery attempts that remained delivered after all bounce signals, computed as effective_delivered / (delivered + bounced). Null when there were no attempts.

data.delivery.bounce_rate
nullable number
obligatoire

Share of this scope's delivery attempts that ultimately failed (inband or out-of-band), computed as all_bounces / (delivered + bounced). Because oob_bounces counts events rather than recipients, all_bounces can exceed the attempt count. The rate is clamped to 1. Null when there were no attempts.

data.delivery.complaint_rate
nullable number
obligatoire

Spam complaints in this scope relative to effectively delivered recipients, computed as complained / effective_delivered. Complaints are attributed by event time, so a scope can record more of them than it effectively delivered, pushing the rate above 1. Null when effective_delivered is zero.

data.engagement
object
obligatoire

Engagement 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.

Afficher les attributs enfants
data.latency
object
obligatoire

Latency quantiles for this Brand. Retained reporting events populate processing and total quantiles; delivery quantiles are null.

Afficher les attributs enfants
total
integer
obligatoire

Total 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_cursor
nullable string
obligatoire

Cursor for the next page. Pass back as starting_after to advance forward. null when no next page exists.

prev_cursor
nullable string
obligatoire

Cursor for the previous page. Pass back as ending_before to step backward. null when no previous page exists.

refresh_cursor
nullable string
obligatoire

Refresh 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.

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.