Sign inGet Started

Get aggregate email statistics

GET
/v1/email/stats/summary
const s = await bird.email.stats.summary({ from: "2026-05-01", to: "2026-05-31" });
console.log(s.sends_accepted, s.delivery.delivered);
Antwort200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "sends_accepted": 12410,
  "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
    }
  },
  "comparison": {
    "period": {
      "from": "2026-05-01",
      "to": "2026-05-25",
      "data_as_of": "2026-05-25T14:03:10Z"
    },
    "sends_accepted": 8230,
    "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
      }
    },
    "delta": {
      "sends_accepted_pct_change": 0.508,
      "delivered_pct_change": 0.122,
      "bounced_pct_change": -0.031,
      "complained_pct_change": 0.018,
      "opened_pct_change": -0.046,
      "delivery_rate_pp": 0.004,
      "open_rate_pp": 0.005,
      "click_rate_pp": 0.002,
      "bounce_rate_pp": -0.0008,
      "complaint_rate_pp": 0.0001,
      "unsubscribe_rate_pp": -0.0001
    }
  }
}

Returns a single-row aggregate across the requested period covering delivery, bounce, complaint, open, and click counts plus the derived rates, along with processing, delivery, and total latency percentiles (p50/p95/p99). Suitable for KPI tiles, campaign reports, and email digests; the daily and hourly endpoints have the same metrics per time bucket.

The aggregate is computed against event time (not send time), so engagement received during the period for messages sent earlier is included. Rate fields are null when their denominator is zero.

The window grain follows the form of from and to: calendar days (YYYY-MM-DD, up to 365 days) or RFC 3339 instants (hour grain, up to 720 hours, 30 days). A rolling window such as the last 24 hours is a single request. Mixing the two forms returns 422. Set timezone to compute day and hour boundaries in a local zone instead of UTC, and compare=previous_period to include the preceding equal-length window in the same response.

Abfrageparameter

fromstring

Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant (rounded down to the hour). Interpreted in timezone (a calendar day names a local day; an instant is rounded down to the local hour), or in UTC when timezone is omitted. A numeric UTC offset (for example +05:45) 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 for day windows, or 168 hours (7 days) before to for hour windows, when omitted.

tostring

Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant (rounded down to the hour). Interpreted in timezone (a calendar day names a local day; an instant is rounded down to the local hour), 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 for day windows, or the current hour for hour windows, in that timezone, when omitted. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).

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

Restrict the statistics to a category or a comma-separated union of categories: transactional or marketing. Mutually exclusive with the other dimension filters; only one may be set per request.

sending_domainstring

Restrict the statistics to a sending domain or a comma-separated union of sending domains (the part of the From address after @). Mutually exclusive with the other dimension filters; only one may be set per request.

tagstring

Restrict the statistics to a tag. Use name to match any value of a tag, or name:value for a specific pair (for example campaign:spring_launch). To combine values of one tag name, separate complete pairs with commas, such as campaign:spring,campaign:summer. Different tag names cannot be combined. Mutually exclusive with the other dimension filters; only one may be set per request.

sending_ipstring

Restrict the statistics to a sending IP or a comma-separated union of IPs. Mutually exclusive with the other dimension filters; only one may be set per request. A sending IP is assigned only after a message reaches delivery, so this filter reports delivery-side metrics only. Accepted, processed, rejected, complaint, and engagement counts are 0, and processing latency is null. Complaint, open, and click rates are 0 when deliveries exist and null otherwise.

recipient_domainstring

Restrict the statistics to a recipient mailbox domain or a comma-separated union of domains (the part of the recipient address after the @, for example gmail.com). Mutually exclusive with the other dimension filters; only one may be set per request.

templatestring

Restricts the statistics to a template or a comma-separated union of templates, identified by ID (emt_…) or name. This parameter is mutually exclusive with other dimension filters.

comparestring

Set to previous_period to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show "+X% vs last period" without a second request.

Possible values: previous_period

Antwort-Payload

period
object
erforderlich

The window the response covers (echoed back from the request, day or hour grain), plus data_as_of, the freshness boundary the data is current to.

Untergeordnete Attribute anzeigen
sends_accepted
integer
erforderlich

Distinct email messages accepted, counted at the message level (one per accepted send regardless of recipient count) across the whole requested period. This field counts messages. delivery.accepted counts recipients, so the two values are not comparable (a single message to 500 recipients is 1 here and up to 500 there).

delivery
object
erforderlich

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 in the range 0 to 1 and is null when its denominator is zero. accepted is reported only where it can be attributed (time buckets and the period summary). Breakdown rows omit it.

Untergeordnete Attribute anzeigen
engagement
object
erforderlich

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.

Untergeordnete Attribute anzeigen
latency
object
erforderlich

Latency percentiles (p50, p95, p99) in milliseconds for the bucket. On the summary endpoint these are computed across the whole period rather than per bucket. Three families are reported:

  • processing: Time from accepting the send to handing the message off for delivery. Measured per processed recipient; null when no recipient in the bucket has reached the processed stage.
  • delivery: Time from handoff to the receiving mail server accepting the message, dominated by recipient-side delivery behavior. Measured per delivered recipient; null when no deliveries occurred in the bucket.
  • total: End-to-end time from accepting the send to delivery, and the number most worth watching against your own delivery targets. Measured per delivered recipient; null when no deliveries occurred in the bucket.

Each family is reported independently. A family is omitted when no qualifying event contributed a latency measurement in the bucket. This also applies when the workspace has not recorded latency for that stage yet. The processing family can therefore be present while delivery and total are absent. A client must handle a missing family, and a null p50/p95/p99 within a present family, by rendering a placeholder rather than assuming a number.

Untergeordnete Attribute anzeigen
comparison
object

The same statistics for the equal-length, inclusive period ending the day immediately before the requested start, together with the change between the two periods. Present only when compare=previous_period is requested. The change is already computed, so a percentage difference needs no second request.

Untergeordnete Attribute anzeigen
comparison.period
object
erforderlich

The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows). For a request covering 2026-05-01 to 2026-05-31, this is 2026-03-31 to 2026-04-30, both inclusive.

Untergeordnete Attribute anzeigen
comparison.sends_accepted
integer
erforderlich

Distinct email messages accepted in the preceding period, counted at the message level.

comparison.delivery
object
erforderlich

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 in the range 0 to 1 and is null when its denominator is zero. accepted is reported only where it can be attributed (time buckets and the period summary). Breakdown rows omit it.

Untergeordnete Attribute anzeigen
comparison.engagement
object
erforderlich

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.

Untergeordnete Attribute anzeigen
comparison.engagement.opens
integer
erforderlich

Distinct open events, counting repeat opens from the same recipient and opens auto-fetched by inbox privacy features (such as Apple Mail Privacy Protection and the Gmail image proxy).

comparison.engagement.opens_non_prefetched
integer
erforderlich

Distinct open events excluding those auto-fetched by inbox privacy features. Same event-counting semantics as opens (repeat opens from the same recipient count separately), with prefetched opens removed.

comparison.engagement.unique_opens
integer
erforderlich

Distinct recipients who opened at least once, including opens auto-fetched by inbox privacy features.

comparison.engagement.unique_opens_non_prefetched
integer
erforderlich

Distinct recipients who opened at least once, excluding opens auto-fetched by inbox privacy features. This is the numerator used for open rate, so iOS-heavy audiences (Apple Mail Privacy Protection and similar) do not inflate it.

comparison.engagement.clicks
integer
erforderlich

Distinct click events, counting repeat clicks from the same recipient.

comparison.engagement.unique_clicks
integer
erforderlich

Distinct recipients who clicked at least once.

comparison.engagement.unsubscribes
integer
erforderlich

Distinct unsubscribe events, recorded via the list-unsubscribe header or the footer link.

comparison.engagement.open_rate
nullable number
erforderlich

Distinct non-prefetched openers relative to effectively delivered recipients in the same scope, computed as unique_opens_non_prefetched / delivery.effective_delivered; on rows without an effective_delivered field (the mailbox-provider breakdowns) the denominator equals delivery.delivered. The numerator excludes opens auto-fetched by inbox privacy features. Opens are attributed by event time, so engagement earned by earlier deliveries can push the rate above 1. Null when the denominator is zero.

comparison.engagement.click_rate
nullable number
erforderlich

Distinct clickers relative to effectively delivered recipients in the same scope, computed as unique_clicks / delivery.effective_delivered (delivery.delivered on rows without an effective_delivered field). Clicks are attributed by event time, so engagement earned by earlier deliveries can push the rate above 1. Null when the denominator is zero.

comparison.engagement.unsubscribe_rate
nullable number
erforderlich

Unsubscribe events relative to effectively delivered recipients in the same scope, computed as unsubscribes / delivery.effective_delivered (delivery.delivered on rows without an effective_delivered field). Unsubscribes are attributed by event time, so the rate can exceed 1. Null when the denominator is zero.

comparison.latency
object
erforderlich

Latency percentiles (p50, p95, p99) in milliseconds for the bucket. On the summary endpoint these are computed across the whole period rather than per bucket. Three families are reported:

  • processing: Time from accepting the send to handing the message off for delivery. Measured per processed recipient; null when no recipient in the bucket has reached the processed stage.
  • delivery: Time from handoff to the receiving mail server accepting the message, dominated by recipient-side delivery behavior. Measured per delivered recipient; null when no deliveries occurred in the bucket.
  • total: End-to-end time from accepting the send to delivery, and the number most worth watching against your own delivery targets. Measured per delivered recipient; null when no deliveries occurred in the bucket.

Each family is reported independently. A family is omitted when no qualifying event contributed a latency measurement in the bucket. This also applies when the workspace has not recorded latency for that stage yet. The processing family can therefore be present while delivery and total are absent. A client must handle a missing family, and a null p50/p95/p99 within a present family, by rendering a placeholder rather than assuming a number.

Untergeordnete Attribute anzeigen
comparison.delta
object
erforderlich

The change in each headline metric from the preceding period to the requested one. A *_pct_change field is a signed relative change in a count, computed as (current - previous) / previous, so 0.5 means 50% higher and -0.2 means 20% lower. It is null when the previous period's count was zero because a relative change cannot be computed. A *_rate_pp field is the signed difference between the two periods' rate values. Each value is expressed as a fraction. A value of 0.012 means the rate rose by 1.2 percentage points. A value of -0.003 means it fell by 0.3 points. The field is null when either period's rate is undefined, because its denominator was zero. delivery_rate_pp and bounce_rate_pp range from -1 to 1, because the rates behind them cannot exceed 1. The engagement deltas have no fixed bound, because events are counted when they arrive rather than when the message was sent, which can push their rate above 1.

Untergeordnete Attribute anzeigen

Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.