---
title: "Get hourly sending statistics"
method: GET
path: "/v1/email/stats/hourly"
tags: ["email-stats"]
---

# Get hourly sending statistics

`GET /v1/email/stats/hourly`

## Request

- Base URL: `https://us1.platform.bird.com`
- URL: `https://us1.platform.bird.com/v1/email/stats/hourly`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `bird_session`

Returns one row of aggregate sending statistics per hour for the workspace: UTC hours by default, or your local hours when `timezone` is set (a timezone with a sub-hour offset gets correctly aligned hours). Useful for inspecting send rate, deliverability, and engagement inside a single day or a recent window; hours with no activity are included with zero counts.

Rows use event time. For example, a click recorded at 14:07 for a message sent at 09:00 lands in the 14:00 row.

A single request may span at most 30 days (720 hourly rows); for longer ranges use the daily endpoint, which has a 365-day window. An hourly window longer than 30 days, or a `from` after `to`, returns `422`.

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `timezone` string
- `category` string
- `sending_domain` string
- `tag` string
- `sending_ip` string
- `recipient_domain` string
- `template` string

## Headers

- `X-Workspace-Id` string
- `X-Organization-Id` string

## Response `200`

Hourly aggregate stats for the requested period.

- EmailStatsResponse: Time-series stats payload. `period` echoes the range and bucket grain actually computed against. `data` is one row per bucket in chronological order.
  - `period` EmailStatsSeriesPeriod, required: The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
    - `from` string, required: Inclusive start of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the first hour bucket, which falls on a local hour boundary when `timezone` is set.
    - `to` string, required: Inclusive end of the window. A calendar day (YYYY-MM-DD, in the requested `timezone`) on the day grain. On the hour grain, an RFC 3339 UTC instant marking the start of the last hour bucket, which falls on a local hour boundary when `timezone` is set.
    - `grain` 'day' | 'hour', required: The bucket grain of the series, either `day` or `hour`.
    - `data_as_of` string, date-time, nullable: The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response reflects data from up to a few seconds ago. Use this field to label data freshness rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
  - `data` EmailStatsPoint[], required: One row per bucket (day or hour, per the grain) in the period, in chronological order. Buckets with no activity are included with zero counts.
    - `bucket` string, required: The day (YYYY-MM-DD, in the requested `timezone`) or hour this point covers, matching the period's grain. An hour bucket is an RFC 3339 UTC instant marking the start of the hour. It falls on a local hour boundary when `timezone` is set, which is on the UTC hour only for whole-hour offsets.
    - `sends_accepted` integer, required: Distinct email messages accepted in this bucket, counted at the message level (one per accepted send regardless of how many recipients it addresses). Every other metric in `delivery` and `engagement` is recipient-level or event-level.
    - `delivery` EmailDeliveryStats, required: 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.
      - `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.
      - `processed` integer, required: Distinct recipients whose message was processed and handed off for delivery.
      - `delivered` integer, required: Distinct recipients whose message the receiving mail server accepted.
      - `bounced` integer, required: 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.
      - `bounces` EmailBounceStatsWithRates, required: 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.
        - `hard` integer, required: Distinct recipients with a permanent delivery failure (invalid address or non-existent domain).
        - `soft` integer, required: Distinct recipients with a transient delivery failure (mailbox full or server temporarily unavailable).
        - `admin` integer, required: Distinct recipients refused by a policy at the receiving end, such as relaying denied or a blocklisted domain.
        - `block` integer, required: Distinct recipients bounced because the receiving mail server blocked the sending IP for reputation reasons.
        - `undetermined` integer, required: Distinct recipients bounced where the receiving server's response did not allow precise classification.
        - `hard_rate` number, nullable, required: Fraction of bounced recipients that hard bounced, computed as `hard / bounced`. Null when `bounced` is zero.
        - `soft_rate` number, nullable, required: Fraction of bounced recipients that soft bounced, computed as `soft / bounced`. Null when `bounced` is zero.
        - `admin_rate` number, nullable, required: Fraction of bounced recipients that admin bounced, computed as `admin / bounced`. Null when `bounced` is zero.
        - `block_rate` number, nullable, required: Fraction of bounced recipients that block bounced, computed as `block / bounced`. Null when `bounced` is zero.
        - `undetermined_rate` number, nullable, required: Fraction of bounced recipients with undetermined classification, computed as `undetermined / bounced`. Null when `bounced` is zero.
      - `complained` integer, required: Distinct recipients who reported the message as spam via a feedback loop.
      - `deferred` integer, required: Distinct recipients whose delivery the receiving server temporarily delayed and is still being retried.
      - `rejected` integer, required: 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.
      - `oob_bounces` integer, required: 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.
      - `effective_delivered` integer, required: 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`.
      - `all_bounces` integer, required: Total recipients in this scope who did not receive the message, computed as `bounced + oob_bounces`.
      - `oob_rate` number, nullable, required: Share of this scope's delivery attempts that resulted in an out-of-band bounce, computed as `oob_bounces / (delivered + bounced)`. Null when there were no attempts.
      - `delivery_rate` number, nullable, required: 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.
      - `bounce_rate` number, nullable, required: 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.
      - `complaint_rate` number, nullable, required: 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.
    - `engagement` EmailEngagementStats, required: 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.
      - `opens` integer, required: 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).
      - `opens_non_prefetched` integer, required: 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.
      - `unique_opens` integer, required: Distinct recipients who opened at least once, including opens auto-fetched by inbox privacy features.
      - `unique_opens_non_prefetched` integer, required: 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.
      - `clicks` integer, required: Distinct click events, counting repeat clicks from the same recipient.
      - `unique_clicks` integer, required: Distinct recipients who clicked at least once.
      - `unsubscribes` integer, required: Distinct unsubscribe events, recorded via the list-unsubscribe header or the footer link.
      - `open_rate` number, nullable, required: 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.
      - `click_rate` number, nullable, required: 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.
      - `unsubscribe_rate` number, nullable, required: 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.
    - `latency` EmailLatencyStats, required: 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.
      - `processing` EmailLatencyQuantiles: Approximate 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.
        - `p50_ms` integer, nullable, required: Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p95_ms` integer, nullable, required: 95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p99_ms` integer, nullable, required: 99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
      - `delivery` EmailLatencyQuantiles: Approximate 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.
        - `p50_ms` integer, nullable, required: Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p95_ms` integer, nullable, required: 95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p99_ms` integer, nullable, required: 99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
      - `total` EmailLatencyQuantiles: Approximate 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.
        - `p50_ms` integer, nullable, required: Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p95_ms` integer, nullable, required: 95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
        - `p99_ms` integer, nullable, required: 99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `403`: Insufficient permissions
- `404`: Resource not found
- `422`: The request has invalid field values, violates a business rule, or carries a query parameter the endpoint does not declare. Field validation errors use `type: validation_error` and include the affected fields in `details`. Business-rule errors identify the failed rule in `type`.
- `429`: Rate limit exceeded
- `500`: Internal server error
- `503`: The service is temporarily unavailable. If `Retry-After` is present, wait for that delay before retrying; otherwise, retry with exponential backoff. Reuse the same idempotency key and request when retrying a mutation.

---

[API](https://skmtc.dev/messagebird/apis/bird-api.md) · [All operations](https://skmtc.dev/messagebird/apis/bird-api/llms.txt) · [OpenAPI document](https://skmtc.dev/messagebird/apis/bird-api/revisions/6dfce1179799?raw)
