WhatsApp· 6 min read

WhatsApp Business analytics API: pricing and template analytics


WhatsApp analytics are fields and edges you read from the Messaging account (WABA) with a Graph API GET. pricing_analytics returns cost and volume per delivered message, and analytics returns sent and delivered counts. The template_analytics edge returns reads, clicks and cost per template. Meta’s analytics page says conversation_analytics “will no longer be available beginning November 1, 2026”, so that field is gone (Meta analytics, accessed 2026-11-04). The pricing categories also changed meaning on October 1, 2026. Neither Meta page used here shows a last-updated date.

Which analytics field answers which question

Field requests share one shape: GET https://graph.facebook.com/v26.0/<WABA_ID>?fields=<FIELD>.<FILTERS>, with filters chained by dots, as in .start(...).end(...). Template, template group and group analytics are edges instead, called as /<WABA_ID>/template_analytics with normal query parameters. The fields Meta lists compare like this.

Field Called as Returns Lookback Granularity
analytics fields= sent, delivered 1 year HALF_HOUR, DAY, MONTH
pricing_analytics fields= volume, cost, tier 1 year HALF_HOUR, DAILY, MONTHLY
template_analytics edge sent, delivered, read, clicked, cost 90 days DAILY only
template_group_analytics edge the same metrics per template group 90 days daily
call_analytics, for the Calling API fields= COUNT, COST, AVERAGE_DURATION not stated HALF_HOUR, DAILY, MONTHLY
group_analytics edge sent, delivered, read, participants joined and left 90 days default DAILY

Meta shortened the lookback recently. From December 1, 2025, “the maximum lookback window for messaging, conversation, and pricing analytics is changing from 10 years to 1 year”. Export what you need to keep before it ages out. Template group analytics is newer: Meta’s changelog dates it to February 14, 2025 (Meta changelog, accessed 2026-11-04).

Watch the granularity names. analytics takes DAY and MONTH, while pricing_analytics takes DAILY and MONTHLY. Keep a separate constant for each field instead of reusing one value.

Meta’s page names no permission scope for these calls. Its examples show only Authorization: Bearer <ACCESS_TOKEN>. Use the system user token you already send with, described in the access tokens post.

The numbers are estimates. Meta says “Analytics data is approximate and may differ from what’s shown on invoices due to small variations in data processing.” Reconcile money against the invoice, and use the API for trends.

What conversation_analytics was

conversation_analytics reported cost and conversation counts by conversation category, direction and type. It belonged to conversation-based pricing, which Meta deprecated on June 30, 2025. Per-message pricing replaced it on July 1, 2025 (Meta pricing, accessed 2026-11-04). Code that still requests the field needs to move to pricing_analytics, which Meta’s pricing page names for “per-message pricing breakdowns and tiering information for delivered messages”.

Webhooks won’t give you volume tiers either. The pricing page says “tiering information is not included in any webhooks”.

Query pricing_analytics

start, end and granularity are required. Everything else filters or splits the result.

Parameter Values
start, end UNIX timestamps
granularity DAILY, HALF_HOUR, MONTHLY
phone_numbers, country_codes arrays; default is every number and every country messaged
dimensions COUNTRY, PHONE, PRICING_CATEGORY, PRICING_TYPE, TIER
metric_types COST, VOLUME; empty returns both
pricing_categories AUTHENTICATION, AUTHENTICATION_INTERNATIONAL, MARKETING, MARKETING_LITE, SERVICE, UTILITY, REFERRAL_CONVERSION
pricing_types FREE_CUSTOMER_SERVICE, FREE_ENTRY_POINT, REGULAR

An empty dimensions list returns no breakdowns. Cost is not returned for accounts that share a Solution Partner’s credit line, so those accounts see volume only. How a template ends up in a category is covered in template categories.

The request below is Meta’s sample with the dates moved into the one-year window. 1790812800 is October 1, 2026 and 1793491200 is November 1, 2026, both at 00:00 UTC.

curl "https://graph.facebook.com/v26.0/$WABA_ID?fields=pricing_analytics.start(1790812800).end(1793491200).granularity(DAILY).dimensions(PRICING_CATEGORY,PRICING_TYPE,TIER,COUNTRY).country_codes(US,IN)" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Meta’s sample response has 14 data points. This copy keeps three of them in their original order. The response keeps Meta’s June 2025 timestamps.

{
  "pricing_analytics": {
    "data": [
      {
        "data_points": [
          {
            "start": 1749193200,
            "end": 1749279600,
            "country": "IN",
            "pricing_type": "FREE_CUSTOMER_SERVICE",
            "pricing_category": "SERVICE",
            "volume": 2,
            "cost": 0
          },
          {
            "start": 1748934000,
            "end": 1749020400,
            "country": "US",
            "tier": "0:MAX",
            "pricing_type": "REGULAR",
            "pricing_category": "MARKETING",
            "volume": 1,
            "cost": 10
          },
          {
            "start": 1748761200,
            "end": 1748847600,
            "country": "US",
            "tier": "0:2",
            "pricing_type": "REGULAR",
            "pricing_category": "UTILITY",
            "volume": 1,
            "cost": 10
          }
        ]
      }
    ]
  }
}

The points sit at pricing_analytics.data[].data_points[]. cost is in “the Messaging account’s currency”. tier joins the lower and upper bounds of a volume tier as <LOWER>:<UPPER>, and the upper bound can be MAX. Free messages carry no tier. Volume tiers apply only to utility and authentication templates, so marketing shows 0:MAX. Rates per country are in the pricing by country post.

What SERVICE and REGULAR mean since October 1, 2026

Meta redefined four values on October 1, 2026. A query that spans that date mixes two meanings in the same label.

Value Through September 30, 2026 From October 1, 2026
SERVICE 1:1 messages that were not charged, including non-template messages and utility messages in a customer service window 1:1 non-template messages
UTILITY 1:1 messages charged the utility rate 1:1 utility messages
FREE_CUSTOMER_SERVICE non-template and utility messages sent within customer service windows non-template messages delivered within the number’s free tier
REGULAR all authentication and marketing templates, plus utility templates outside a window adds utility messages inside a window and non-template messages past the free tier

The free tier is 1,000 delivered service messages per number per month, and unused messages do not roll over (Meta pricing, accessed 2026-11-04). The October 2026 service charges post covers the billing side. For reports, split every range at 1790812800 and label the two halves.

The other values didn’t change. FREE_ENTRY_POINT counts “All messages sent within free entry point customer service windows”, which click-to-WhatsApp ads open. MARKETING_LITE is “Messages charged the marketing-lite rate”.

Count sent and delivered messages with analytics

analytics needs start, end and granularity. phone_numbers and country_codes narrow the result. product_types separates 0 (templates to users), 2 (non-template messages to users) and 100 (messages from users). Meta’s sample splits the URL across lines inside the quotes, puts the token in the query string and adds a comment to the JSON. The version below fixes all three and uses recent dates.

curl "https://graph.facebook.com/v26.0/$WABA_ID?fields=analytics.start(1790812800).end(1793491200).granularity(DAY)" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Each point in analytics.data_points[] has start, end, sent and delivered. A parser that reads both analytics and pricing_analytics has to handle both nesting shapes.

Turn on template analytics first

Template analytics only capture data after you confirm them on the WABA, in WhatsApp Manager or with the call below. Meta says confirmation can’t be undone, and the API returns the account id.

curl -X POST "https://graph.facebook.com/v26.0/$WABA_ID?is_enabled_for_insights=true" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Then query the edge with up to 10 template_ids. This is Meta’s sample with your IDs and the last 30 days, so it stays inside the 90-day window. -g stops curl from reading the square brackets as a range. Meta’s sample sends lowercase daily, although its parameter table lists DAILY.

START=$(( $(date +%s) - 30*86400 ))
curl -g "https://graph.facebook.com/v26.0/$WABA_ID/template_analytics?start=$START&end=$(date +%s)&granularity=daily&metric_types=cost%2Cclicked%2Cdelivered%2Cread%2Csent&template_ids=[$TEMPLATE_ID]" \
  -H "Authorization: Bearer $ACCESS_TOKEN"

Each point has sent, delivered, read and a cost array, plus a clicked array when the template has button clicks. Cost types are amount_spent, cost_per_delivered and cost_per_url_button_click, which ignores quick reply clicks. Meta’s click-type list names only url_button and unique_url_button, yet its sample response returns quick_reply_button. Parse any type.

Three limits change what the numbers mean. Click data covers only MARKETING and UTILITY templates. Read and click counts are kept for 7 days; after that, “the corresponding read/click counts reset to zero”. Template analytics are not supported for accounts owned by or shared with EU or Japan business accounts, or numbers with those calling codes. For quality signals, see template quality ratings.

A cost report from pricing_analytics

The script groups volume and cost by country, category and pricing type. With WABA_ID and ACCESS_TOKEN set, it queries the last 30 days. Without them, it parses the shortened sample above.

# pricing_report.py. Python 3.9 or later, standard library only.
# Live: WABA_ID=... ACCESS_TOKEN=... python3 pricing_report.py
import json
import os
import time
import urllib.parse
import urllib.request
from collections import defaultdict

SAMPLE = """{"pricing_analytics": {"data": [{"data_points": [
 {"start": 1749193200, "end": 1749279600, "country": "IN", "pricing_type": "FREE_CUSTOMER_SERVICE",
  "pricing_category": "SERVICE", "volume": 2, "cost": 0},
 {"start": 1748934000, "end": 1749020400, "country": "US", "tier": "0:MAX", "pricing_type": "REGULAR",
  "pricing_category": "MARKETING", "volume": 1, "cost": 10},
 {"start": 1748761200, "end": 1748847600, "country": "US", "tier": "0:2", "pricing_type": "REGULAR",
  "pricing_category": "UTILITY", "volume": 1, "cost": 10}
]}]}}"""


def fetch(waba_id, token, days=30):
    end = int(time.time())
    start = end - days * 86400
    field = (f"pricing_analytics.start({start}).end({end}).granularity(DAILY)"
             ".dimensions(PRICING_CATEGORY,PRICING_TYPE,COUNTRY)")
    url = f"https://graph.facebook.com/v26.0/{waba_id}?" + urllib.parse.urlencode({"fields": field})
    req = urllib.request.Request(url, headers={"Authorization": f"Bearer {token}"})
    with urllib.request.urlopen(req, timeout=30) as resp:
        return json.load(resp)


def points(body):
    # pricing_analytics nests points under data[]; analytics keeps them at the top level.
    if "pricing_analytics" in body:
        for block in body["pricing_analytics"].get("data", []):
            yield from block.get("data_points", [])
    elif "analytics" in body:
        yield from body["analytics"].get("data_points", [])


# summarize() is for pricing_analytics only
def summarize(body):
    totals = defaultdict(lambda: {"volume": 0, "cost": 0.0})
    for p in points(body):
        key = (p.get("country", "ALL"), p.get("pricing_category", "-"), p.get("pricing_type", "-"))
        totals[key]["volume"] += p.get("volume", 0)
        totals[key]["cost"] += p.get("cost", 0)
    return totals


if __name__ == "__main__":
    waba_id, token = os.environ.get("WABA_ID"), os.environ.get("ACCESS_TOKEN")
    body = fetch(waba_id, token) if waba_id and token else json.loads(SAMPLE)
    for (country, category, ptype), t in sorted(summarize(body).items()):
        print(f"{country:<4} {category:<28} {ptype:<22} volume={t['volume']:<6} cost={t['cost']:.2f}")

A 30-day window run today starts after October 1, 2026, so every label has its new meaning. A window that starts earlier crosses the change, so run it as two calls split at 1790812800.

Z-API Omni team