---
title: "Get hourly inbound Apple Messages for Business statistics"
method: GET
path: "/v1/amb/stats/inbound/hourly"
tags: ["amb-stats"]
---

# Get hourly inbound Apple Messages for Business statistics

`GET /v1/amb/stats/inbound/hourly`

## Request

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

Returns one row of inbound Apple Messages for Business counts per hour, gap-filled so a silent hour is a zero row rather than a missing one. Every row is attributed to the hour the inbound event occurred, not to any earlier outbound message. Use it where the daily grain hides the shape; a window spans at most 720 hours (30 days), and for anything longer use the daily endpoint.

This channel has no delivery receipt and no derived rate; each row carries only the raw `received` count.

`from` and `to` are optional RFC 3339 instants, defaulting to the trailing 168 hours; each bound rounds down to the hour and remains inclusive. A request may span up to 30 days (720 rows). An excessive or reversed window returns `422`. Set `timezone` for local hours instead of UTC, including zones with sub-hour offsets; when the timezone's offset is not a whole number of hours, rows are read from finer-grained internal rollups and combined into hour boundaries automatically, with no parameter to select this. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `timezone` string

## Headers

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

## Response `200`

Hourly inbound series for the requested period.

- AMBInboundStatsResponse: Received-message time series. `period` echoes the range the server computed against; `data` is one row per bucket in chronological order.
  - `period` AMBStatsSeriesPeriod, 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) on the day grain, an RFC 3339 instant on the hour grain. Historical starts are preserved; the maximum request length does not impose a historical cutoff.
    - `to` string, required: Inclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain.
    - `grain` 'day' | 'hour', required: The bucket grain of the series, either `day` or `hour`.
    - `data_as_of` string, date-time, nullable: Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.
  - `attribution` 'accepted_time' | 'event_time', required: Which timestamp a statistics response buckets its rows and totals by: - `accepted_time`: attributed to when Bird accepted the outbound message for sending. The outbound send statistics use this, so a later event for the same message, such as a send failure, still counts against the day or hour its message was accepted. - `event_time`: attributed to when the event itself occurred. Inbound message statistics, conversation statistics and the staff per-business failure counts use this, since there is no earlier outbound event to anchor them to. A response never mixes the two axes: every row and total in one payload shares the same attribution.
  - `data` AMBInboundStatsPoint[], required: One row per bucket (day or hour, matching the request) in the period, in chronological order. Buckets with no activity are included with a count of zero, so the series charts continuously without client-side gap handling.
    - `bucket` string, required: The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the request's grain.
    - `received` integer, required: Distinct messages received in this bucket.

## 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)
