Sign inGet Started

Get aggregate outbound WhatsApp statistics

GET
/v1/whatsapp/stats/summary
const summary = await bird.whatsapp.stats.summary({
  from: "2026-08-01",
  to: "2026-08-31",
  timezone: "Europe/Amsterdam",
});
console.log(summary.delivery, summary.latency);
Réponse200
{
  "period": {
    "from": "2026-05-01",
    "to": "2026-05-25",
    "data_as_of": "2026-05-25T14:03:10Z"
  },
  "delivery": {
    "accepted": 4820,
    "sent": 4810,
    "delivered": 4720,
    "failed": 25,
    "rejected": 412,
    "delivery_rate": 0.9793,
    "failure_rate": 0.0052
  },
  "engagement": {
    "read": 3105,
    "read_rate": 0.6578
  },
  "latency": {
    "processing": {
      "p50_ms": 610,
      "p95_ms": 2140,
      "p99_ms": 5380
    },
    "delivery": {
      "p50_ms": 1530,
      "p95_ms": 6820,
      "p99_ms": 18400
    },
    "total": {
      "p50_ms": 2180,
      "p95_ms": 9060,
      "p99_ms": 24300
    }
  },
  "comparison": {
    "period": {
      "from": "2026-04-06",
      "to": "2026-04-30",
      "data_as_of": "2026-05-25T14:03:10Z"
    },
    "delivery": {
      "accepted": 3196,
      "sent": 3190,
      "delivered": 3120,
      "failed": 31,
      "rejected": 380,
      "delivery_rate": 0.9762,
      "failure_rate": 0.0097
    },
    "engagement": {
      "read": 1980,
      "read_rate": 0.6346
    },
    "latency": {
      "processing": {
        "p50_ms": 610,
        "p95_ms": 2140,
        "p99_ms": 5380
      },
      "delivery": {
        "p50_ms": 1530,
        "p95_ms": 6820,
        "p99_ms": 18400
      },
      "total": {
        "p50_ms": 2180,
        "p95_ms": 9060,
        "p99_ms": 24300
      }
    },
    "delta": {
      "accepted_pct_change": 0.508,
      "sent_pct_change": 0.508,
      "delivered_pct_change": 0.513,
      "failed_pct_change": -0.194,
      "rejected_pct_change": 0.084,
      "read_pct_change": 0.568,
      "delivery_rate_pp": 0.0031,
      "failure_rate_pp": -0.0045,
      "read_rate_pp": 0.0232
    }
  }
}

Returns one aggregate row for the requested period. It includes WhatsApp lifecycle counts, delivery and failure rates, and processing, delivery, and total latency percentiles (p50, p95, and p99). Rows use send-time attribution, so recent periods can under-report delivered while delivery reports arrive.

Rate fields are null when their denominator is zero. from and to must both be calendar days or RFC 3339 instants. Day windows cover up to 365 whole days. Instant bounds round down to the hour, remain inclusive, and may span up to 720 hours. Mixing the forms returns 422. Set timezone for local boundaries.

Set one dimension filter at most; more than one returns 422. Use compare=previous_period to include the preceding equal-length window and each metric's change.

Paramètres de requête

fromstring

Inclusive start of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The timezone parameter makes a calendar day local and rounds an instant down to the local hour. Omit timezone to use UTC. When timezone is set, a numeric UTC offset such as +05:45 is rejected; use a calendar day or a Z (UTC) instant. This value must use the same form as to. When omitted, it defaults to 30 days before to for day windows or 168 hours (7 days) before to for hour windows.

tostring

Inclusive end of the window: a calendar day (YYYY-MM-DD) or an RFC 3339 instant rounded down to the hour. The timezone parameter makes a calendar day local and rounds an instant down to the local hour. Omit timezone to use UTC. When timezone is set, a numeric UTC offset is rejected; use a calendar day or a Z (UTC) instant. This value must use the same form as from. When omitted, it defaults to today for day windows or the current hour for hour windows in that timezone. Day windows may not exceed 365 days; hour windows may not exceed 720 hours (30 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.

templatestring

Restricts the statistics to one template, identified by its ID (wat_…) or slug. Mutually exclusive with the other dimension filters (category, phone_number, tag); only one may be set per request. An ID matches the template_id key on a row of the per-template breakdown; a slug is accepted for callers that predate that key and resolves to the same messages.

categorystring

Restrict the statistics to a single template category. Mutually exclusive with the other dimension filters (template, phone_number, tag); only one may be set per request. Matches the category key on a row of the per-category breakdown.

Possible values (may grow over time): authentication, utility, marketing

phone_numberstring

Restrict the statistics to a single business sender phone number, in E.164 form. Mutually exclusive with the other dimension filters (template, category, tag); only one may be set per request. Matches the phone_number key on a row of the per-phone-number breakdown.

tagstring

Restrict the statistics to a single tag. Use name to match any value of a tag, or name:value for a specific pair (for example campaign:spring_launch). Mutually exclusive with the other dimension filters (template, category, phone_number); only one may be set per request. A row of the per-tag breakdown carries the same pair in its single tag key.

comparestring

Set to previous_period to also include the same statistics for the immediately preceding window of equal length, plus the change between the two, so you can show "+X% vs last period" without a second request. The comparison window carries any dimension filter set on the request, so a filtered comparison compares like with like.

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
delivery
object
obligatoire
Afficher les attributs enfants
engagement
object
obligatoire
Afficher les attributs enfants
latency
object
obligatoire
Afficher les attributs enfants
latency.processing
object

Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.

Afficher les attributs enfants
latency.delivery
object

Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.

Afficher les attributs enfants
latency.total
object

Approximate p50, p95, and p99 latency percentiles in milliseconds for one latency family. All three are null when no qualifying event contributed a measurement.

Afficher les attributs enfants

Poursuivez avec la documentation, les guides et les exemples sur ce sujet.