---
title: "Get inbound SMS statistics by message type"
canonical: "https://bird.com/docs/api/reference/get-sms-inbound-stats-by-content-type"
---

# Get inbound SMS statistics by message type

`GET /v1/sms/stats/inbound/content-types`

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.

## Servers

- `https://{region}.platform.bird.com`: Regional API endpoint. Use the host for the region your organization is hosted in. Official Bird SDKs and the CLI select it automatically from your API key, so you rarely need to set it by hand.
  - `region`: `us1`, `eu1`. Default: `us1`. The region your organization's data is hosted in.

## Authentication

Use one authentication option:

- `BearerAuth`: HTTP bearer authentication. Pass the API key as a bearer token in the `Authorization` header. Workspace
keys use `bk_{region}_*`; organization master keys use `bm_{region}_*`.
The prefix identifies the region and selects the
API endpoint. Official Bird SDKs and the CLI derive the region from the key.

## Code samples

**TypeScript**

```ts
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);
}
```

Examples: [TypeScript](/docs/api/reference/get-sms-inbound-stats-by-content-type.ts.md) · [Python](/docs/api/reference/get-sms-inbound-stats-by-content-type.py.md) · [Go](/docs/api/reference/get-sms-inbound-stats-by-content-type.go.md) · [PHP](/docs/api/reference/get-sms-inbound-stats-by-content-type.php.md) · [CLI](/docs/api/reference/get-sms-inbound-stats-by-content-type.cli.md) · [MCP](/docs/api/reference/get-sms-inbound-stats-by-content-type.mcp.md) · [cURL](/docs/api/reference/get-sms-inbound-stats-by-content-type.curl.md)

## Example response `200`

```json
{
  "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
}
```

## Query parameters

- `content_type` (string, optional)

  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`
- `from` (string, optional): 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, optional): 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, optional): 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.
- `limit` (integer, optional): 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.

## Header parameters

- `X-Workspace-Id` (string, optional): Workspace context for the request. Required for dashboard authentication and master keys. Workspace keys and access tokens already identify their workspace; send that workspace or omit the header. A different one is rejected.
- `X-Organization-Id` (string, optional): Organization context for the request. Required for dashboard authentication. An API key or access token carries its own organization, so send either that organization or no header at all; a different one is rejected.

## Response body

- `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.
- `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.
- `data.content_type` (string, required)

  Message type used for reporting. Previously recorded statistics remain attributed to SMS. New activity uses the message type.

  Possible values: `sms`, `mms`
- `data.received` (integer, required): Distinct messages received on numbers in this message type during the period.
- `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.

## Related resources

- [Should I use a Bird SDK or call the API directly?](/explained/platform/should-i-use-an-sdk-or-call-the-api-directly) (answer)
- [Build your first integration](/learn/paths/integration) (course)
- [Send your first email](/docs/get-started/send-your-first-email) (docs)

[Get an implementation brief](/learn/workspace?topic=api-basics)
