Get pricing analytics
Message volume and approximate cost for one connected WhatsApp number, read live
from Meta's pricing_analytics on the WhatsApp Business Account and scoped to
that account's phone number. Meta's figures are approximate and can lag; Meta
bills from its own invoice. Meta limits how far back and how fine the data goes
(for example HALF_HOUR only over short ranges) and answers out-of-range requests
with an error.
Authorization
bearerAuth API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.
In: header
Query Parameters
WhatsApp account ID
Range start, ISO 8601 date or date-time.
date-timeRange end, ISO 8601 date or date-time. Must be after start.
date-timeValue in
- "HALF_HOUR"
- "DAILY"
- "MONTHLY"
Comma-separated breakdowns: COUNTRY, PHONE, PRICING_CATEGORY, PRICING_TYPE, TIER. Without it each data point is a total for the interval.
Comma-separated: COST, VOLUME. Defaults to both.
Comma-separated filter: REGULAR, FREE_CUSTOMER_SERVICE, FREE_ENTRY_POINT.
Comma-separated filter of Meta pricing categories, for example MARKETING, MARKETING_LITE, UTILITY, AUTHENTICATION, AUTHENTICATION_INTERNATIONAL, SERVICE, REFERRAL_CONVERSION.
Comma-separated ISO 3166-1 alpha-2 country codes to filter on.
Response Body
application/json
application/json
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.whatsappphonenumbers.getWhatsAppPricingAnalytics({ query: { accountId: 'account_abc123', start: '2026-01-15T10:00:00Z', end: '2026-01-15T10:00:00Z', granularity: 'HALF_HOUR', },});console.log(data);{ "accountId": "66e000000000000000000001", "phoneNumber": "34600000000", "granularity": "DAILY", "start": "2026-09-01T00:00:00.000Z", "end": "2026-09-30T00:00:00.000Z", "dataPoints": [ { "start": "2026-09-01T00:00:00.000Z", "end": "2026-09-02T00:00:00.000Z", "phoneNumber": null, "country": "ES", "tier": null, "pricingType": null, "pricingCategory": "MARKETING", "volume": 12, "cost": 0.73 } ]}Revoke a sandbox session
Hard-deletes the session. The user loses the ability to send to that phone via the sandbox until they re-activate it. Existing conversations and messages already exchanged with that phone are untouched. Revocation only blocks FUTURE sends. Sessions belonging to other users cannot be revoked; the response is the same 400 as "session not found" so existence isn't leaked.
List iMessage audience
Contacts who have messaged your iMessage senders (1:1 threads), with subscription state and, for threads opened through a tracked opt-in link, the parameters that brought them in. Newest activity first.