Get outbound SMS statistics by status
GET
/v1/sms/stats/statuses
const stats = await bird.sms.stats.byStatus({ from: "2026-05-01", to: "2026-05-31" });
for (const row of stats.data ?? []) {
console.log(row.status, row.count);
}stats = client.sms.stats.by_status(from_="2026-05-01", to="2026-05-31")
for row in stats.data or []:
print(row.status, row.count)stats, err := client.Sms.Stats.ByStatus(context.Background(), bird.SmsStatsByStatusParams{
From: time.Now().AddDate(0, -1, 0),
To: time.Now(),
})
if err != nil {
log.Fatal(err)
}
for _, row := range *stats.Data {
fmt.Println(*row.Status, *row.Count)
}$byStatus = $bird->sms->stats->byStatus(['from' => '2026-05-01', 'to' => '2026-05-31']);
foreach ($byStatus->getData() ?? [] as $row) {
echo $row->getStatus(), ' ', $row->getCount(), PHP_EOL;
}bird sms stats by-statuscurl -X GET "https://us1.platform.bird.com/v1/sms/stats/statuses" \
-H "Authorization: Bearer $TOKEN"Response200
{
"period": {
"from": "2026-05-01T00:00:00Z",
"to": "2026-05-25T00:00:00Z",
"data_as_of": "2026-05-25T14:03:10Z"
},
"data": [
{
"status": "delivered",
"count": 14720
}
],
"total": 5
}
Returns one row per lifecycle status with activity in the requested period, ordered by count descending. The statuses are accepted, sent, delivered, undelivered, failed, rejected, and expired.
Rows use send-time attribution. A delivery confirmed during the period for a message accepted earlier counts against the earlier period. A recent period therefore under-reports delivered while delivery reports are still arriving. With at most seven statuses, this breakdown has no cap, ranking, limit, or trend parameters.
The maximum window is 365 days; requesting a longer range returns 422.
Query Parameters
from
string
Start date (inclusive) in 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) in 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 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.
Response Payload
period
object
required
The date range the response covers (echoed back from the request), plus data_as_of, the freshness boundary the data is current to.
Show child attributes
period.from
string
required
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
period.to
string
required
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.
data
array of object
required
Status breakdown rows, one per lifecycle status with activity, ordered by count descending. Empty when no messages had activity in the period.
Show child attributes
data.status
string
required
The lifecycle status this row counts. These are successive lifecycle stages. The accepted status was admitted for sending, sent was handed to the carrier, and delivered was confirmed by the carrier. The undelivered, failed, and expired statuses are failure outcomes. The rejected status was refused before a send attempt. Counted outcomes are a subset of the full message status vocabulary. The pre-send scheduled, cancellation canceled, and inbound-only received statuses are not send outcomes, so they never appear here.
Possible values: accepted, sent, delivered, undelivered, failed, rejected, expired
data.count
integer
required
Distinct messages that reached this lifecycle status in the period, attributed to the message's send time rather than the event's own.
total
integer
required
Number of distinct lifecycle statuses with activity in the period (at most seven). Equal to the number of rows returned, since this breakdown is never capped.