Get inbound SMS statistics by operator
/v1/sms/stats/inbound/operatorsconst stats = await bird.sms.stats.inbound.byOperator({ from: "2026-05-01", to: "2026-05-31" });
for (const row of stats.data ?? []) {
// Messages whose operator the carrier did not report are excluded, so these
// rows can sum to less than the inbound summary for the same period.
console.log(row.mcc_mnc, row.received);
}stats = client.sms.stats.inbound.by_operator(from_="2026-05-01", to="2026-05-31")
for row in stats.data or []:
# Messages whose operator the carrier did not report are excluded, so these
# rows can sum to less than the inbound summary for the same period.
print(row.mcc_mnc, row.received)stats, err := client.Sms.Stats.Inbound.ByOperator(context.Background(), bird.SmsStatsInboundByOperatorParams{
From: time.Now().AddDate(0, -1, 0),
To: time.Now(),
})
if err != nil {
log.Fatal(err)
}
for _, row := range *stats.Data {
// Messages whose operator the carrier did not report are excluded, so
// these rows can sum to less than the inbound summary for the same period.
fmt.Println(*row.MccMnc, *row.Received)
}$inboundByOperator = $bird->sms->stats->inbound->byOperator(['from' => '2026-05-01', 'to' => '2026-05-31']);
foreach ($inboundByOperator->getData() ?? [] as $row) {
// Messages whose operator the carrier did not report are excluded, so these
// rows can sum to less than the inbound summary for the same period.
echo $row->getMccMnc(), ' ', $row->getReceived(), PHP_EOL;
}bird sms stats inbound by-operatorcurl -X GET "https://us1.platform.bird.com/v1/sms/stats/inbound/operators" \
-H "Authorization: Bearer $TOKEN" \
--url-query "limit=50"{
"period": {
"from": "2026-05-01",
"to": "2026-05-25",
"data_as_of": "2026-05-25T14:03:10Z"
},
"data": [
{
"mcc_mnc": "311480",
"received": 640
}
],
"total": 38
}
Returns the number of messages your numbers received, grouped by the sender's mobile operator. Rows are ranked by volume, highest first, and use the time the carrier received each message. Operators are identified by MCC-MNC when the carrier reports it.
Each row contains only a count because a received message has one state. Messages without a reported sending operator are excluded, so the rows can sum to less than the summary total.
The maximum window is 365 days; a longer range returns 422. Set timezone to resolve the period against your local calendar.
Paramètres de requête
fromstringStart 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.
tostringEnd 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.
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.
limitintegerMaximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.
Contenu de la réponse
periodThe window the server actually computed against. The summary serves two window grains: calendar days (bounds are YYYY-MM-DD) and hours (bounds are RFC 3339 instants on the hour). The grain of from and to mirrors the grain of the request's bounds.
dataOne row per operator with activity in the period, most messages first, capped at the requested limit. An operator with no messages in the period is absent rather than zero-filled, because unlike a time bucket it is not part of a continuous axis.
totalTotal number of distinct sending operators with activity in the period, regardless of limit. When it exceeds the number of rows returned, the ranking was capped; raise limit (up to 200) or narrow the window to see more.
Ressources associées
Poursuivez avec la documentation, les guides et les exemples sur ce sujet.