Sign inGet Started

Get aggregate outbound Apple Messages for Business statistics

GET
/v1/amb/stats/summary
const result = await bird.amb.stats.summary({
  business_id: "abz_01krdgeqcxet5s7t44vh8rt9mg",
});
console.log(result);
Respuesta200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "attribution": "accepted_time",
  "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
  },
  "comparison": {
    "period": {
      "from": "2026-05-01",
      "to": "2026-05-25",
      "data_as_of": "2026-05-25T14:03:10Z"
    },
    "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
    },
    "delta": {
      "accepted_pct_change": 0.508,
      "sent_pct_change": 0.501,
      "send_failed_pct_change": -0.12,
      "rejected_pct_change": 0
    }
  }
}
Returns one aggregate row of outbound Apple Messages for Business counts and latency percentiles (p50, p95, and p99) for the requested period. Counts are attributed to the time each message was accepted, so a send failure recorded today counts against the day its message was accepted; period.data_as_of is the freshness boundary the rollups have reached.
There is no delivery receipt on this channel, so there is no delivered count, delivery rate, or delivery-latency figure anywhere in this response. latency.processing covers acceptance to Apple handoff, and first_response measures the oldest unanswered inbound message to acceptance of the first outbound reply that claims it. When no qualifying message contributes a measurement, processing percentiles are null and first_response is omitted.
from and to must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns 422. Set timezone for local boundaries. Historical dates are supported within the maximum window length; the requested dates are not shifted forward.
Set one dimension filter at most (business_id, message_kind, intent, group, category, or tag); more than one returns 422. Use compare=previous_period to include the preceding equal-length window and each metric's change.
Parámetros de consulta
from
string
Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The timezone parameter makes a calendar day local and rounds an instant down to the local hour. Omit timezone to use UTC. When timezone is set, a numeric UTC offset such as +05:45 is rejected; use a calendar day or a Z (UTC) instant. This value must use the same form as to. When omitted, it defaults to 30 days before to for day windows or 168 hours (7 days) before to for hour windows.
to
string
Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The timezone parameter makes a calendar day local and rounds an instant down to the local hour. Omit timezone to use UTC. When timezone is set, a numeric UTC offset is rejected; use a calendar day or a Z (UTC) instant. This value must use the same form as from. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 days).
timezone
string
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.
business_id
string
Restrict the statistics to a single business. Mutually exclusive with the other dimension filters (message_kind, intent, group, category, tag); only one may be set per request. Matches the business_id key on a row of the per-business breakdown.
message_kind
string
Restrict the statistics to a single message content kind. Mutually exclusive with the other dimension filters (business_id, intent, group, category, tag); only one may be set per request. Matches the message_kind key on a row of the per-content-kind breakdown.
Possible values: text, attachment, rich_link, quick_reply, list_picker, time_picker, form, apple_pay, authenticate, imessage_app, interactive
intent
string
Restrict the statistics to a single entry-point intent. Mutually exclusive with the other dimension filters (business_id, message_kind, group, category, tag); only one may be set per request. Matches the intent key on a row of the per-intent breakdown.
group
string
Restrict the statistics to a single entry-point group. Mutually exclusive with the other dimension filters (business_id, message_kind, intent, category, tag); only one may be set per request. Matches the group key on a row of the per-group breakdown.
category
string
Restrict the statistics to a single message category. Mutually exclusive with the other dimension filters (business_id, message_kind, intent, group, tag); only one may be set per request. Matches the category key on a row of the per-category breakdown.
tag
string
Restrict the statistics to a single tag. Use name to match any value of a tag, or name:value for a specific pair (for example campaign:spring_launch). Mutually exclusive with the other dimension filters (business_id, message_kind, intent, group, category); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single tag key.
compare
string
Set to previous_period to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show "+X% vs last period" without a second request. The comparison window carries any dimension filter set on the request, so a filtered comparison compares like with like.
Possible values: previous_period
Carga de respuesta
period
object
obligatorio
The window the response covers (echoed back from the request), plus data_as_of, the freshness boundary the data is current to.
Mostrar atributos secundarios
period.from
string
obligatorio
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary. Historical starts are preserved; the maximum request length does not impose a historical cutoff.
period.to
string
obligatorio
Inclusive end of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
period.data_as_of
nullable string
Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.
attribution
string
obligatorio
Always accepted_time for outbound statistics.
Possible values: accepted_time, event_time
counts
object
obligatorio
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.
Mostrar atributos secundarios
counts.accepted
integer
obligatorio
Distinct messages accepted for sending after admission checks. This is the denominator for sent_rate and send_failure_rate.
counts.sent
integer
obligatorio
Distinct messages handed off to Apple.
counts.send_failed
integer
obligatorio
Distinct accepted messages that Apple refused or that exhausted their send attempts. See last_error.code on the message for the reason; a refused charge is not a send failure, it is rejected.
counts.rejected
integer
obligatorio
Distinct messages refused before any send attempt, because the destination has no price, the wallet could not fund the send, or the content cannot be sent yet. Rejected messages are never charged and are not counted in accepted, so the total addressed is accepted + rejected. Excluded from send_failure_rate, which covers send failures only.
counts.sent_rate
nullable number
obligatorio
Share of accepted messages Apple acknowledged, computed as sent / accepted. Null when no messages were accepted in scope. This stands where other channels report a delivery rate.
counts.send_failure_rate
nullable number
obligatorio
Share of accepted messages that failed to send, computed as send_failed / accepted. Null when no messages were accepted in scope.
latency
object
obligatorio
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.
Mostrar atributos secundarios
latency.processing
object
obligatorio
Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.
Mostrar atributos secundarios
latency.processing.p50_ms
nullable integer
obligatorio
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.processing.p95_ms
nullable integer
obligatorio
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.processing.p99_ms
nullable integer
obligatorio
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
first_response
object
Time from the oldest unanswered inbound message to acceptance of the first outbound reply that claims it. Reported on summaries and breakdowns. Omitted when no qualifying reply contributes a measurement.
Mostrar atributos secundarios
first_response.p50_ms
nullable integer
obligatorio
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
first_response.p95_ms
nullable integer
obligatorio
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
first_response.p99_ms
nullable integer
obligatorio
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison
object
The same statistics for the equal-length, inclusive period ending immediately before the requested start, together with the change between the two periods. Present only when compare=previous_period is requested. The change is already computed, so a percentage difference needs no second request.
Mostrar atributos secundarios
comparison.period
object
obligatorio
The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows).
Mostrar atributos secundarios
comparison.period.from
string
obligatorio
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary. Historical starts are preserved; the maximum request length does not impose a historical cutoff.
comparison.period.to
string
obligatorio
Inclusive end of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
comparison.period.data_as_of
nullable string
Latest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.
comparison.counts
object
obligatorio
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.
Mostrar atributos secundarios
comparison.counts.accepted
integer
obligatorio
Distinct messages accepted for sending after admission checks. This is the denominator for sent_rate and send_failure_rate.
comparison.counts.sent
integer
obligatorio
Distinct messages handed off to Apple.
comparison.counts.send_failed
integer
obligatorio
Distinct accepted messages that Apple refused or that exhausted their send attempts. See last_error.code on the message for the reason; a refused charge is not a send failure, it is rejected.
comparison.counts.rejected
integer
obligatorio
Distinct messages refused before any send attempt, because the destination has no price, the wallet could not fund the send, or the content cannot be sent yet. Rejected messages are never charged and are not counted in accepted, so the total addressed is accepted + rejected. Excluded from send_failure_rate, which covers send failures only.
comparison.counts.sent_rate
nullable number
obligatorio
Share of accepted messages Apple acknowledged, computed as sent / accepted. Null when no messages were accepted in scope. This stands where other channels report a delivery rate.
comparison.counts.send_failure_rate
nullable number
obligatorio
Share of accepted messages that failed to send, computed as send_failed / accepted. Null when no messages were accepted in scope.
comparison.latency
object
obligatorio
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.
Mostrar atributos secundarios
comparison.latency.processing
object
obligatorio
Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.
Mostrar atributos secundarios
comparison.latency.processing.p50_ms
nullable integer
obligatorio
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.processing.p95_ms
nullable integer
obligatorio
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.processing.p99_ms
nullable integer
obligatorio
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.first_response
object
First-response latency percentiles for the preceding period. Omitted when no qualifying message in that period has a measurement.
Mostrar atributos secundarios
comparison.first_response.p50_ms
nullable integer
obligatorio
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.first_response.p95_ms
nullable integer
obligatorio
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.first_response.p99_ms
nullable integer
obligatorio
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.delta
object
obligatorio
Changes from the previous period. Each value is the signed relative change (current - previous) / previous and is null when the previous count is zero.
Mostrar atributos secundarios
comparison.delta.accepted_pct_change
nullable number
obligatorio
Relative change in accepted messages (counts.accepted) versus the previous period, as a signed fraction. Null when the previous period accepted none.
comparison.delta.sent_pct_change
nullable number
obligatorio
Relative change in sent messages (counts.sent) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.send_failed_pct_change
nullable number
obligatorio
Relative change in send failures (counts.send_failed) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.rejected_pct_change
nullable number
obligatorio
Relative change in rejected messages (counts.rejected) versus the previous period, as a signed fraction. Null when the previous period had none.