Sign inGet Started

Get inbound Apple Messages for Business statistics by business

GET
/v1/amb/stats/inbound/businesses
const result = await bird.amb.stats.inbound.byBusiness({ limit: 2 });
console.log(result);
Réponse200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "attribution": "accepted_time",
  "data": [
    {
      "business_account_id": "abz_01krdgeqcxet5s7t44vh8rt9mg",
      "received": 640
    }
  ],
  "total": 1
}

Returns inbound received counts grouped by business, for the requested period. Rows are ranked by received volume descending and capped at the requested limit (default 50, max 200). Rows are attributed to when the inbound event occurred, not to any earlier outbound message. This channel has no delivery receipt and no derived rate, so each row carries only the raw received count. The maximum window is 365 days; a longer range returns 422. Historical dates are supported within the maximum window length; the requested dates are not shifted forward. A breakdown is already a single-dimension view and takes no dimension filter; to restrict statistics to a single business, use the inbound summary, daily, or hourly statistics instead.

Paramètres de requête

fromstring

Inclusive start of the window, a calendar day (YYYY-MM-DD). Interpreted in timezone, or UTC when omitted. Must not be after to. Max window 365 days. Defaults to 30 days before to when omitted.

tostring

Inclusive end of the window, a calendar day (YYYY-MM-DD). Interpreted in timezone, or UTC when omitted. Max window 365 days. Defaults to today in that timezone when 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.

limitinteger

Maximum number of business rows to return, ranked by received volume descending.

Contenu de la réponse

period
object
obligatoire

The window the response covers (echoed back), plus data_as_of.

Afficher les attributs enfants
attribution
string
obligatoire

Always event_time for inbound statistics.

Possible values: accepted_time, event_time

data
array of object
obligatoire

Business rows ranked by received-message volume descending, capped at the requested limit. A business with no received messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.

Afficher les attributs enfants
total
integer
obligatoire

Total distinct businesses with received messages in the period, regardless of limit.

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