amb-stats

Get hourly Apple Messages for Business conversation statistics

Returns one row of Apple Messages for Business conversation lifecycle counts (started, reopened, closed, conversations) 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 lifecycle event occurred, not to any earlier outbound message. A conversation can be reopened and closed more than once, so started, reopened, and closed need not sum to conversations within a row, and any one of them can exceed it. 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.

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.

get/v1/amb/stats/conversations/hourly

Request

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

Query parameters

fromstring date-time
Example:2026-05-25T00:00:00Z

Start of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when timezone is set and the UTC hour otherwise. The window may not exceed 30 days (720 hours). Defaults to 168 hours (7 days) before to when omitted.

tostring date-time
Example:2026-05-25T23:59:59Z

End of the window (RFC 3339 instant), rounded down to the start of its hour and included. The boundary uses the local hour when timezone is set and the UTC hour otherwise, so both bounds are inclusive. The window may not exceed 30 days (720 hours). Defaults to the current hour when omitted.

timezonestring
Example:Asia/Kathmandu

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.

Headers

X-Workspace-Idstring

Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.

X-Organization-Idstring

Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

Response

Hourly conversation series for the requested period.

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.

Example response

{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "grain": "day",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "attribution": "accepted_time",
  "data": [
    {
      "bucket": "2026-05-25",
      "counts": {
        "started": 210,
        "reopened": 34,
        "closed": 198,
        "conversations": 205
      }
    }
  ]
}

Changes

No recorded changes to this operation across all 2 revisions of this API.