Sign inGet started

Get aggregate inbound WhatsApp statistics

GET
/v1/whatsapp/stats/inbound/summary
const summary = await bird.whatsapp.stats.inbound.summary({ from: "2026-05-01", to: "2026-05-31" });
console.log(summary.received);
Réponse200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "received": 4210,
  "comparison": {
    "period": {
      "from": "2026-04-06",
      "to": "2026-04-30",
      "data_as_of": "2026-05-25T14:03:10Z"
    },
    "received": 3980,
    "delta": {
      "received_pct_change": 0.058
    }
  }
}
Returns the total number of WhatsApp messages your business numbers received over the period, using the time each message reached your number.
The response contains only a count because a received message has one state. Use the send statistics endpoints for delivery rates and latency data about messages you send.
The maximum window is 365 days for a day-grain range, or 720 hours for an hour-grain range; a longer range returns 422. Set timezone to resolve the period against your local calendar instead of UTC.
Paramètres de requête
from
string
Inclusive start of the window, either a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The form you use selects the grain the total is resolved at. Interpreted in timezone, or in UTC when timezone is omitted. Must use the same form as to. A numeric UTC offset (for example +05:45) is rejected when timezone is set; pass a calendar day or a Z instant instead. Defaults to 30 days before to for day windows, or 168 hours before to for hour windows.
to
string
Inclusive end of the window, in the same form as from. Defaults to today, or the current hour for an hour window. A day window may not exceed 365 days and an hour window 720 hours.
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.
compare
string
Set to previous_period to include the received-message count for the immediately preceding window of equal length. The response also includes the change between the two, so you can show "+X% vs last period" without a second request.
Possible values: previous_period
Contenu de la réponse
period
object
obligatoire
The window the response covers (echoed back from the request), plus data_as_of, the freshness boundary the data is current to.
Afficher les attributs enfants
period.from
string
obligatoire
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
period.to
string
obligatoire
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.
received
integer
obligatoire
Distinct messages received in the period, counted by the time each message reached your number. Computed across the whole window rather than summed from the daily or hourly series, so it can sit slightly below the sum of those rows.
comparison
object
Afficher les attributs enfants
comparison.period
object
obligatoire
The preceding window these comparison figures cover, the equal-length window ending immediately before the requested start (the prior day for day windows, the prior hour for hour windows). For a request covering 2026-05-01 to 2026-05-25, this is 2026-04-06 to 2026-04-30, both inclusive.
Afficher les attributs enfants
comparison.period.from
string
obligatoire
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
comparison.period.to
string
obligatoire
Inclusive end of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
comparison.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.
comparison.received
integer
obligatoire
Distinct messages received in the preceding period.
comparison.delta
object
obligatoire
Afficher les attributs enfants
comparison.delta.received_pct_change
nullable number
obligatoire
Relative change in received messages versus the previous period, as a signed fraction. Null when the previous period received none.