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);
Respons200
{
  "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.
Parameter Kueri
from
string
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.
to
string
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).
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.
template
string
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.
category
string
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_number
string
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.
tag
string
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.
compare
string
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
Payload Respons
period
object
wajib
The window the response covers (echoed back from the request), plus data_as_of, the freshness boundary the data is current to.
Tampilkan atribut turunan
period.from
string
wajib
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
period.to
string
wajib
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.
delivery
object
wajib
Tampilkan atribut turunan
delivery.accepted
integer
wajib
Distinct messages accepted for sending after admission checks. This is the denominator for delivery_rate and failure_rate.
delivery.sent
integer
wajib
Distinct messages handed off for delivery.
delivery.delivered
integer
wajib
Distinct messages confirmed delivered to the recipient's device.
delivery.failed
integer
wajib
Distinct messages that failed during sending or delivery.
delivery.rejected
integer
wajib
Distinct messages rejected before any send attempt, because the recipient is on the workspace's suppression list, no reachable recipient was given, the destination has no price, or the wallet could not fund the send. Rejected messages are never charged and are not counted in accepted, so the total addressed is accepted + rejected. Excluded from failure_rate, which covers send failures only.
delivery.delivery_rate
nullable number
wajib
Share of accepted messages that were delivered, computed as delivered / accepted. Null when no messages were accepted in scope.
delivery.failure_rate
nullable number
wajib
Share of accepted messages that ultimately failed, computed as failed / accepted. Null when no messages were accepted in scope.
engagement
object
wajib
Tampilkan atribut turunan
engagement.read
integer
wajib
Distinct messages confirmed read by the recipient.
engagement.read_rate
nullable number
wajib
Distinct messages read relative to messages delivered in the same scope, computed as read / delivery.delivered. Both counts are attributed by send time, so a read is counted alongside its own message's delivery. The rate can exceed 1 where a read receipt arrived for a message whose delivery receipt did not, or, at high volume, because the counts are close estimates. Null when delivery.delivered is zero.
latency
object
wajib
Tampilkan atribut turunan
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.
Tampilkan atribut turunan
latency.processing.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.processing.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.processing.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
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.
Tampilkan atribut turunan
latency.delivery.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.delivery.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.delivery.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
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.
Tampilkan atribut turunan
latency.total.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.total.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
latency.total.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison
object
Tampilkan atribut turunan
comparison.period
object
wajib
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.
Tampilkan atribut turunan
comparison.period.from
string
wajib
Inclusive start of the window, as a calendar day (YYYY-MM-DD) or an RFC 3339 hour boundary.
comparison.period.to
string
wajib
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.delivery
object
wajib
Tampilkan atribut turunan
comparison.delivery.accepted
integer
wajib
Distinct messages accepted for sending after admission checks. This is the denominator for delivery_rate and failure_rate.
comparison.delivery.sent
integer
wajib
Distinct messages handed off for delivery.
comparison.delivery.delivered
integer
wajib
Distinct messages confirmed delivered to the recipient's device.
comparison.delivery.failed
integer
wajib
Distinct messages that failed during sending or delivery.
comparison.delivery.rejected
integer
wajib
Distinct messages rejected before any send attempt, because the recipient is on the workspace's suppression list, no reachable recipient was given, the destination has no price, or the wallet could not fund the send. Rejected messages are never charged and are not counted in accepted, so the total addressed is accepted + rejected. Excluded from failure_rate, which covers send failures only.
comparison.delivery.delivery_rate
nullable number
wajib
Share of accepted messages that were delivered, computed as delivered / accepted. Null when no messages were accepted in scope.
comparison.delivery.failure_rate
nullable number
wajib
Share of accepted messages that ultimately failed, computed as failed / accepted. Null when no messages were accepted in scope.
comparison.engagement
object
wajib
Tampilkan atribut turunan
comparison.engagement.read
integer
wajib
Distinct messages confirmed read by the recipient.
comparison.engagement.read_rate
nullable number
wajib
Distinct messages read relative to messages delivered in the same scope, computed as read / delivery.delivered. Both counts are attributed by send time, so a read is counted alongside its own message's delivery. The rate can exceed 1 where a read receipt arrived for a message whose delivery receipt did not, or, at high volume, because the counts are close estimates. Null when delivery.delivered is zero.
comparison.latency
object
wajib
Tampilkan atribut turunan
comparison.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.
Tampilkan atribut turunan
comparison.latency.processing.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.processing.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.processing.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.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.
Tampilkan atribut turunan
comparison.latency.delivery.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.delivery.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.delivery.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.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.
Tampilkan atribut turunan
comparison.latency.total.p50_ms
nullable integer
wajib
Median (50th percentile) latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.total.p95_ms
nullable integer
wajib
95th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.latency.total.p99_ms
nullable integer
wajib
99th percentile latency in milliseconds. Null when no qualifying event contributed a measurement.
comparison.delta
object
wajib
Tampilkan atribut turunan
comparison.delta.accepted_pct_change
nullable number
wajib
Relative change in accepted messages (delivery.accepted) versus the previous period, as a signed fraction. Null when the previous period accepted none.
comparison.delta.sent_pct_change
nullable number
wajib
Relative change in sent messages (delivery.sent) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.delivered_pct_change
nullable number
wajib
Relative change in delivered messages (delivery.delivered) versus the previous period, as a signed fraction. Null when the previous period delivered none.
comparison.delta.failed_pct_change
nullable number
wajib
Relative change in failed messages (delivery.failed) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.rejected_pct_change
nullable number
wajib
Relative change in rejected messages (delivery.rejected) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.read_pct_change
nullable number
wajib
Relative change in messages read (engagement.read) versus the previous period, as a signed fraction. Null when the previous period had none.
comparison.delta.delivery_rate_pp
nullable number
wajib
Signed difference between this period's and the previous period's delivery rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's delivery rate is undefined.
comparison.delta.failure_rate_pp
nullable number
wajib
Signed difference between this period's and the previous period's failure rate, both fractions in [0,1] (multiply by 100 for percentage points). Null when either period's failure rate is undefined.
comparison.delta.read_rate_pp
nullable number
wajib
Signed difference between the current and previous read-rate fractions. Multiply by 100 for percentage points. The value can fall outside [-1, 1] because a read receipt can arrive for a message whose delivery receipt did not, and high-volume counts are approximate. Null when either rate is undefined.

Sumber daya terkait

Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini. Sumber daya tersedia dalam bahasa Inggris.

Dapatkan ringkasan implementasi