Get hourly Apple Messages for Business conversation statistics
GET
/v1/amb/stats/conversations/hourly
const result = await bird.amb.stats.conversations.hourly();
console.log(result);result = client.amb.stats.conversations.hourly()
print(result)result, err := client.Amb.Stats.Conversations.Hourly(ctx, bird.AmbStatsConversationsHourlyParams{})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->stats->conversations->hourly();bird amb stats conversations hourlycurl -X GET "https://us1.platform.bird.com/v1/amb/stats/conversations/hourly" \
-H "Authorization: Bearer $TOKEN"Antwort200
{
"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
}
}
]
}
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.
Abfrageparameter
from
string
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.
to
string
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.
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.
Antwort-Payload
period
object
erforderlich
The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
Untergeordnete Attribute anzeigen
period.from
string
erforderlich
Inclusive start of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain. Historical starts are preserved; the maximum request length does not impose a historical cutoff.
period.to
string
erforderlich
Inclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant on the hour grain.
period.grain
string
erforderlich
The bucket grain of the series, either day or hour.
Possible values: day, hour
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
erforderlich
Always event_time for conversation statistics.
Possible values: accepted_time, event_time
data
array of object
erforderlich
One row per day or hour in chronological order. Buckets with no activity contain zero counts.
Untergeordnete Attribute anzeigen
data.bucket
string
erforderlich
The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.
data.counts
object
erforderlich
Conversation lifecycle counts for the requested scope, attributed to when each event occurred. A conversation can start, reopen, and close more than once over its life, so started, reopened, and closed can each exceed conversations, the number of distinct conversations touched in scope. Very large counts are close estimates rather than exact tallies.
Untergeordnete Attribute anzeigen
data.counts.started
integer
erforderlich
Count of conversation-started events in scope.
data.counts.reopened
integer
erforderlich
Count of conversation-reopened events in scope.
data.counts.closed
integer
erforderlich
Count of conversation-closed events in scope.
data.counts.conversations
integer
erforderlich
Distinct conversations with at least one lifecycle event in scope.
Verwandte Ressourcen
Weiter mit der Dokumentation, Anleitungen und Beispielen zu diesem Thema. Die Ressourcen sind auf Englisch.
Das Konzept verstehenShould I use a Bird SDK or call the API directly?Dem Lernpfad folgenBuild your first integrationImplementierungsleitfadenSend your first email
Implementierungs-Briefing erhalten