Get hourly outbound SMS statistics
/v1/sms/stats/hourlyconst stats = await bird.sms.stats.hourly({
from: "2026-05-30T00:00:00Z",
to: "2026-05-31T00:00:00Z",
});
for (const point of stats.data ?? []) {
console.log(point.bucket, point.delivery);
}stats = client.sms.stats.hourly(from_="2026-05-30T00:00:00Z", to="2026-05-31T00:00:00Z")
for point in stats.data or []:
print(point.bucket, point.delivery)series, err := client.Sms.Stats.Hourly(context.Background(), bird.SmsStatsHourlyParams{
From: time.Now().Add(-24 * time.Hour),
To: time.Now(),
})
if err != nil {
log.Fatal(err)
}
for _, point := range *series.Data {
fmt.Println(*point.Bucket, *point.Delivery.Accepted)
}$hourly = $bird->sms->stats->hourly(['from' => '2026-05-30T00:00:00Z', 'to' => '2026-05-31T00:00:00Z']);
foreach ($hourly->getData() ?? [] as $point) {
echo $point->getBucket(), PHP_EOL;
}bird sms stats hourlycurl -X GET "https://us1.platform.bird.com/v1/sms/stats/hourly" \
-H "Authorization: Bearer $TOKEN"{
"period": {
"from": "2026-05-01",
"to": "2026-05-31",
"grain": "day",
"data_as_of": "2026-05-25T14:03:10Z"
},
"data": [
{
"bucket": "2026-05-25",
"delivery": {
"accepted": 14820,
"sent": 14810,
"delivered": 14720,
"undelivered": 60,
"failed": 25,
"rejected": 10,
"expired": 5
}
}
]
}
Returns one row of SMS lifecycle counts per hour. Rows use send-time attribution, so a delivery confirmation is counted in the hour when its message was accepted. Recent rows can under-report delivered while delivery reports arrive.
Rates and latency are whole-window aggregates available from the summary endpoint. Set timezone for local hours instead of UTC, including zones with sub-hour offsets.
A request may span up to 30 days (720 rows). from and to are ISO 8601 instants; each bound rounds down to the hour and remains inclusive. An excessive or reversed window returns 422. Use the daily endpoint for longer ranges.
Query Parameters
fromstringStart of the window (ISO 8601 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. When timezone is set, a numeric UTC offset such as +05:45 is rejected; use a Z (UTC) instant. Defaults to 7 days before to when omitted.
tostringEnd of the window (ISO 8601 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. When timezone is set, a numeric UTC offset is rejected; use a Z (UTC) instant. Defaults to the current hour when omitted. The window may not exceed 30 days (720 hours).
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.
originatorstringRestrict the statistics to a single originator (the sender address messages were sent from). Mutually exclusive with the other dimension filters (country, category, carrier); only one may be set per request. Matches the message from.
countrystringRestrict the statistics to a single destination country, as an ISO 3166-1 alpha-2 code. Mutually exclusive with the other dimension filters (originator, category, carrier); only one may be set per request.
categorystringRestrict the statistics to a single category. Mutually exclusive with the other dimension filters (originator, country, carrier); only one may be set per request.
carrierstringRestrict the statistics to a single delivery carrier. Mutually exclusive with the other dimension filters (originator, country, category); only one may be set per request.
Response Payload
periodThe window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
Show child attributes
period.fromInclusive start of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant rounded to the hour on the hour grain.
period.toInclusive end of the window. A calendar day (YYYY-MM-DD) on the day grain, an RFC 3339 instant rounded to the hour on the hour grain.
period.grainThe bucket grain of the series, either day or hour.
Possible values: day, hour
period.data_as_ofLatest time reflected in the statistics. More recent events might not be included yet. Null when the freshness boundary is unavailable.
dataOne row per day or hour in chronological order. Buckets with no activity contain zero counts.
Show child attributes
data.bucketThe day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.
data.deliveryShow child attributes
data.delivery.acceptedDistinct messages accepted for sending after admission checks.
data.delivery.sentDistinct messages handed off to the carrier for delivery.
data.delivery.deliveredDistinct messages the carrier confirmed as delivered to the handset.
data.delivery.undeliveredDistinct messages the carrier reported as not delivered.
data.delivery.failedDistinct messages that failed during sending.
data.delivery.rejectedDistinct messages rejected before any send attempt, for example by sending policy or a message-generation failure.
data.delivery.expiredDistinct messages that could not be delivered within their validity window and expired.
Related resources
Continue with the documentation, guides and examples for this topic.