Sign inGet Started

Get inbound SMS statistics by message type

GET
/v1/sms/stats/inbound/content-types
const stats = await bird.sms.stats.inbound.byContentType({
  from: "2026-05-01",
  to: "2026-05-31",
});
for (const row of stats.data ?? []) {
  console.log(row.content_type, row.received);
}
Response200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "data": [
    {
      "content_type": "sms",
      "received": 1840
    }
  ],
  "total": 2
}

Returns received-message counts grouped by SMS or MMS over the requested period. Previously recorded statistics remain attributed to SMS. New activity uses the message type.

Query Parameters

content_typestring

Restrict statistics to SMS or MMS. Omit to include both. This filter can be combined with an existing dimension filter where the operation supports one. Previously recorded statistics remain attributed to SMS. New activity uses the message type, so a late MMS delivery can appear under MMS while its earlier send remains under SMS.

Possible values: sms, mms

fromstring

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.

tostring

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.

timezonestring

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.

limitinteger

Maximum rows to return, ranked by volume. Defaults to 50; the maximum is 200, and asking for more returns 422 rather than silently returning fewer.

Response Payload

period
object
required

The 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.

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

One row per message type with activity in the period, most messages first, capped at the requested limit. A message type 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.

Show child attributes
total
integer
required

Total number of distinct message types 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.

Continue with the documentation, guides and examples for this topic.