Get outbound Apple Messages for Business statistics by intent
/v1/amb/stats/intentsconst result = await bird.amb.stats.byIntent({ limit: 2 });
console.log(result);result = client.amb.stats.by_intent(limit=2)
print(result)result, err := client.Amb.Stats.ByIntent(ctx, bird.AmbStatsByIntentParams{Limit: 2})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->stats->byIntent(['limit' => '2']);bird amb stats by-intentcurl -X GET "https://us1.platform.bird.com/v1/amb/stats/intents" \
-H "Authorization: Bearer $TOKEN" \
--url-query "limit=50"{
"period": {
"from": "2026-05-01",
"to": "2026-05-25",
"data_as_of": "2026-05-25T14:03:10Z"
},
"attribution": "accepted_time",
"data": [
{
"intent": "order_support",
"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": 5
}
Returns outbound counts and latency percentiles grouped by entry-point intent, for the requested period. Rows are ranked by accepted volume descending and capped at the requested limit (default 50, max 200). Intents are workspace-defined strings configured on the business's entry points and have no fixed vocabulary. 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 intent, use the summary, daily, or hourly statistics instead.
Abfrageparameter
fromstringInclusive 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.
tostringInclusive 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.
timezonestringIANA 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.
limitintegerMaximum number of intent rows to return, ranked by accepted volume descending.
Antwort-Payload
periodThe window the response covers (echoed back), plus data_as_of.
attributionAlways accepted_time for outbound statistics.
Possible values: accepted_time, event_time
dataIntent rows ranked by accepted volume descending.
Untergeordnete Attribute anzeigen
data.intentThe intent these messages were routed under, as configured in the business's entry points. Intents are workspace-defined and have no fixed vocabulary.
data.countsOutbound 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.
Untergeordnete Attribute anzeigen
data.counts.acceptedDistinct messages accepted for sending after admission checks. This is the denominator for sent_rate and send_failure_rate.
data.counts.sentDistinct messages handed off to Apple.
data.counts.send_failedDistinct 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.
data.counts.rejectedDistinct 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.
data.counts.sent_rateShare 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.
data.counts.send_failure_rateShare of accepted messages that failed to send, computed as send_failed / accepted. Null when no messages were accepted in scope.
data.latencyProcessing-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.first_responseFirst-response latency percentiles for this intent. Omitted when no qualifying message contributes a measurement.
totalTotal distinct intents with activity in the period, regardless of limit.
Verwandte Ressourcen
Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema.