Get hourly inbound SMS statistics
/v1/sms/stats/inbound/hourlyconst stats = await bird.sms.stats.inbound.hourly({
from: "2026-05-30T00:00:00Z",
to: "2026-05-31T00:00:00Z",
});
for (const point of stats.data ?? []) {
console.log(point.bucket, point.received);
}stats = client.sms.stats.inbound.hourly(
from_="2026-05-30T00:00:00Z", to="2026-05-31T00:00:00Z"
)
for point in stats.data or []:
print(point.bucket, point.received)series, err := client.Sms.Stats.Inbound.Hourly(context.Background(), bird.SmsStatsInboundHourlyParams{
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.Received)
}$inboundHourly = $bird->sms->stats->inbound->hourly([
'from' => '2026-05-30T00:00:00Z',
'to' => '2026-05-31T00:00:00Z',
]);
foreach ($inboundHourly->getData() ?? [] as $point) {
echo $point->getBucket(), ' ', $point->getReceived(), PHP_EOL;
}bird sms stats inbound hourlycurl -X GET "https://us1.platform.bird.com/v1/sms/stats/inbound/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-01",
"received": 128
}
]
}
Returns the number of messages your numbers received, one row per hour. Rows use the time the carrier received each message, and hours with no messages contain a zero count.
Each row contains only a count because a received message has one state. Use the outbound statistics endpoints for lifecycle and delivery-latency data about messages you send.
The maximum window is 720 hours; a longer range returns 422. Set timezone to bucket rows by your local hour instead of UTC.
Paramètres de requête
fromstringStart of the window (inclusive), an RFC 3339 instant truncated to the hour. Defaults to 7 days (168 hours) before to when omitted.
tostringEnd of the window (inclusive), an RFC 3339 instant truncated to the hour. Defaults to the current hour when omitted. Window may not exceed 720 hours. A numeric UTC offset (for example +05:45) is rejected when timezone is set; pass a calendar day or a Z instant instead.
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.
Contenu de la réponse
periodThe window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
dataOne row per bucket (day or hour, per the grain) in the period, in chronological order. Buckets with no activity are included with a count of zero, so the series charts continuously without client-side gap handling.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.