Daily SMS statistics
GET
/v1/sms/stats/daily
const stats = await bird.sms.stats.daily({ from: "2026-05-01", to: "2026-05-31" });
for (const point of stats.data ?? []) {
console.log(point.bucket, point.delivery);
}stats = client.sms.stats.daily(from_="2026-05-01", to="2026-05-31")
for point in stats.data or []:
print(point.bucket, point.delivery)series, err := client.Sms.Stats.Daily(context.Background(), bird.SmsStatsDailyParams{
From: time.Now().AddDate(0, 0, -7),
To: time.Now(),
})
if err != nil {
log.Fatal(err)
}
for _, point := range *series.Data {
fmt.Println(*point.Bucket, *point.Delivery.Accepted)
}$daily = $bird->sms->stats->daily(['from' => '2026-05-01', 'to' => '2026-05-31']);
foreach ($daily->getData() ?? [] as $point) {
echo $point->getBucket(), PHP_EOL;
}bird sms stats dailycurl -X GET "https://us1.platform.bird.com/v1/sms/stats/daily" \
-H "Authorization: Bearer $TOKEN"Returns one row of aggregate SMS statistics per calendar day for the workspace.
Rows are bucketed by send time, not event time -- a delivery confirmation received on Wednesday for a message accepted the prior Monday is counted in Monday's row, alongside that message's own accepted. A recent row therefore under-reports delivered while its delivery reports are still arriving, and its counts only ever grow toward the truth. Days with no activity are still included with zero counts.
Each row carries lifecycle counts only (accepted, sent, delivered, undelivered, failed, rejected, expired); rates and latency are whole-window aggregates available from the summary endpoint. The response is well suited for charts and trend lines; for per-message exact accounting use the message detail endpoints.
The maximum window is 365 days; requesting a longer range returns 422. Set timezone to report rows by your local calendar day instead of UTC.
Paramètres de requête
from
string
Start date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in timezone (a UTC day when timezone is omitted). Defaults to 30 days before to when omitted.
to
string
End date (inclusive), YYYY-MM-DD. Interpreted as a calendar day in timezone (a UTC day when timezone is omitted). Defaults to today in that timezone when omitted. Window may not exceed 365 days.
timezone
string
IANA timezone identifier (for example Asia/Kathmandu) to report in; defaults to UTC. Day and hour boundaries and the default window when from and to are omitted both follow it, so a calendar-day from or to names a local day. A from or to carrying its own UTC offset is rejected while this is set: pass a calendar day or a Z instant.
originator
string
Restrict 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.
country
string
Restrict 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.
category
string
Restrict the statistics to a single category. Mutually exclusive with the other dimension filters (originator, country, carrier); only one may be set per request.
carrier
string
Restrict the statistics to a single delivery carrier. Mutually exclusive with the other dimension filters (originator, country, category); only one may be set per request.
Contenu de la réponse
period
object
obligatoire
The window and bucket grain the response covers, echoed from the request, plus the freshness boundary the data is current to.
Afficher les attributs enfants
period.from
string
obligatoire
Inclusive 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.to
string
obligatoire
Inclusive 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.grain
string
obligatoire
The bucket grain of the series, either day or hour.
Possible values: day, hour
period.data_as_of
nullable string
The instant the statistics in this response are current to: events recorded up to roughly this time are reflected, while more recent events may not be yet. Statistics are served from a rolling aggregation that refreshes every few seconds, so a response is near-real-time but not live; use this field to label data freshness rather than assuming the numbers are to-the-second. Null when the freshness boundary is not being reported.
data
array of object
obligatoire
One row per bucket (day or hour, per the grain) in the period, in chronological order. Zero-filled -- buckets with no activity are included with zero counts, so the series charts continuously without client-side gap handling.
Afficher les attributs enfants
data.bucket
string
obligatoire
The day (YYYY-MM-DD) or hour (RFC 3339, on the hour) this point covers, matching the period's grain.
data.delivery
object
obligatoire
Afficher les attributs enfants
data.delivery.accepted
integer
obligatoire
Distinct messages accepted for sending after admission checks.
data.delivery.sent
integer
obligatoire
Distinct messages handed off to the carrier for delivery.
data.delivery.delivered
integer
obligatoire
Distinct messages the carrier confirmed as delivered to the handset.
data.delivery.undelivered
integer
obligatoire
Distinct messages the carrier reported as not delivered.
data.delivery.failed
integer
obligatoire
Distinct messages that failed during sending.
data.delivery.rejected
integer
obligatoire
Distinct messages rejected before any send attempt, for example by sending policy or a message-generation failure.
data.delivery.expired
integer
obligatoire
Distinct messages that could not be delivered within their validity window and expired.