Get aggregate Apple Messages for Business conversation statistics
GET
/v1/amb/stats/conversations/summary
const result = await bird.amb.stats.conversations.summary();
console.log(result);result = client.amb.stats.conversations.summary()
print(result)result, err := client.Amb.Stats.Conversations.Summary(ctx, bird.AmbStatsConversationsSummaryParams{})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)$bird->amb->stats->conversations->summary();bird amb stats conversations summarycurl -X GET "https://us1.platform.bird.com/v1/amb/stats/conversations/summary" \
-H "Authorization: Bearer $TOKEN"Respuesta200
{
"period": {
"from": "2026-05-01",
"to": "2026-05-25",
"data_as_of": "2026-05-25T14:03:10Z"
},
"attribution": "accepted_time",
"counts": {
"started": 210,
"reopened": 34,
"closed": 198,
"conversations": 205
},
"comparison": {
"period": {
"from": "2026-05-01",
"to": "2026-05-25",
"data_as_of": "2026-05-25T14:03:10Z"
},
"counts": {
"started": 210,
"reopened": 34,
"closed": 198,
"conversations": 205
},
"delta": {
"started_pct_change": 0.22,
"reopened_pct_change": -0.05,
"closed_pct_change": 0.19,
"conversations_pct_change": 0.21
}
}
}
Returns one aggregate row of Apple Messages for Business conversation lifecycle counts (started, reopened, closed, conversations) for the requested period. Rows are attributed to when 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, and any one of them can exceed it. period.data_as_of is the freshness boundary the rollups have reached.
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.
Use compare=previous_period to include the preceding equal-length window and the change between the two.
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.
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.
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 event_time for conversation statistics.
Possible values: accepted_time, event_time
counts
object
obligatorio
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.
Mostrar atributos secundarios
counts.started
integer
obligatorio
Count of conversation-started events in scope.
counts.reopened
integer
obligatorio
Count of conversation-reopened events in scope.
counts.closed
integer
obligatorio
Count of conversation-closed events in scope.
counts.conversations
integer
obligatorio
Distinct conversations with at least one lifecycle event in scope.
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
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.
Mostrar atributos secundarios
comparison.counts.started
integer
obligatorio
Count of conversation-started events in scope.
comparison.counts.reopened
integer
obligatorio
Count of conversation-reopened events in scope.
comparison.counts.closed
integer
obligatorio
Count of conversation-closed events in scope.
comparison.counts.conversations
integer
obligatorio
Distinct conversations with at least one lifecycle event in scope.
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.started_pct_change
nullable number
obligatorio
Relative change in conversation starts (counts.started) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.reopened_pct_change
nullable number
obligatorio
Relative change in conversation reopens (counts.reopened) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.closed_pct_change
nullable number
obligatorio
Relative change in conversation closes (counts.closed) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.conversations_pct_change
nullable number
obligatorio
Relative change in distinct conversations touched (counts.conversations) versus the previous period, as a signed fraction. Null when the previous period had none.
Recursos relacionados
Continúa con la documentación, guías y ejemplos sobre este tema. Los recursos están en inglés.
Comprender el conceptoShould I use a Bird SDK or call the API directly?Seguir la ruta de aprendizajeBuild your first integrationGuía de implementaciónSend your first email
Obtener un resumen de implementación