Sign inGet Started

Get outbound Apple Messages for Business statistics by message kind

GET
/v1/amb/stats/message-kinds
const result = await bird.amb.stats.byMessageKind({ limit: 2 });
console.log(result);
प्रतिक्रिया200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "attribution": "accepted_time",
  "data": [
    {
      "message_kind": "text",
      "counts": {
        "accepted": 4820,
        "sent": 4790,
        "send_failed": 30,
        "rejected": 4,
        "sent_rate": 0.9938,
        "send_failure_rate": 0.0062
      },
      "latency": {
        "processing": {
          "p50_ms": 610,
          "p95_ms": 2140,
          "p99_ms": 5380
        }
      },
      "first_response": {
        "p50_ms": 610,
        "p95_ms": 2140,
        "p99_ms": 5380
      }
    }
  ],
  "total": 4
}

Returns outbound counts and latency percentiles grouped by message content kind, for the requested period. Rows are ranked by accepted volume descending and capped at the requested limit (default 50, max 200). Rows use accepted-time attribution: a send failure recorded during the period for a message accepted earlier counts against the earlier period. Each row also carries first_response latency percentiles, omitted when no qualifying message contributes a measurement. There is no delivery receipt on this channel, so there is no delivered count anywhere in the row. 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 content kind, use the summary, daily, or hourly statistics instead.

Query पैरामीटर

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 content-kind rows to return, ranked by accepted volume descending.

Response Payload

period
object
आवश्यक

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

चाइल्ड एट्रिब्यूट दिखाएँ
attribution
string
आवश्यक

Always accepted_time for outbound statistics.

Possible values: accepted_time, event_time

data
array of object
आवश्यक

Content-kind rows ranked by accepted volume descending.

चाइल्ड एट्रिब्यूट दिखाएँ
data.message_kind
string
आवश्यक

The content kind these messages were sent as, the same value the message read returns as its content kind discriminator.

Possible values: text, attachment, rich_link, quick_reply, list_picker, time_picker, form, apple_pay, authenticate, imessage_app, interactive

data.counts
object
आवश्यक

Outbound Apple Messages for Business counts for the requested scope, attributed to when each message was accepted. Apple Messages for Business has no delivery receipt, so there is no delivered count anywhere in this API: sent is the last outbound state Bird observes for a message. Very large counts are close estimates rather than exact tallies. Rates are computed once here, clamped to 1, and null when nothing was accepted.

चाइल्ड एट्रिब्यूट दिखाएँ
data.latency
object
आवश्यक

Processing-latency percentiles in milliseconds for the requested scope, from acceptance to Apple handoff. Apple Messages for Business has no delivery receipt, so there is no delivery or total member beside processing. Conversation response timing is reported separately in first_response. Always present; every percentile is null when no qualifying message in scope has a measurement.

चाइल्ड एट्रिब्यूट दिखाएँ
data.latency.processing
object
आवश्यक

Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.

चाइल्ड एट्रिब्यूट दिखाएँ
data.latency.processing.p50_ms
nullable integer
आवश्यक

Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.

data.latency.processing.p95_ms
nullable integer
आवश्यक

95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.

data.latency.processing.p99_ms
nullable integer
आवश्यक

99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.

data.first_response
object

First-response latency percentiles for this content kind. Omitted when no qualifying message contributes a measurement.

चाइल्ड एट्रिब्यूट दिखाएँ
total
integer
आवश्यक

Total distinct content kinds with activity in the period, regardless of limit.

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।