Zernio
Zernio
API Reference

WhatsApp

Templates

List templatesGETCreate templatePOSTGet templateGETUpdate templatePATCHDelete templateDELETEGet template by idGETUpdate template by idPATCHDelete template by idDELETELook up a library templateGET

Business Profile

Get business profileGETUpdate business profilePOSTUpload profile picturePOSTGet display name statusGETRequest display name changePOSTGet business usernameGETGet username suggestionsGETSet business usernamePOSTDelete business usernameDELETE

Groups

List active groupsGETCreate groupPOSTGet group infoGETUpdate group settingsPOSTDelete groupDELETEAdd participantsPOSTRemove participantsDELETECreate invite linkPOSTList join requestsGETApprove join requestsPOSTReject join requestsDELETE

Blocking

Check if a user is blockedGETList blocked usersGETBlock usersPOSTUnblock usersDELETE

Media

Download WhatsApp mediaGET

Commerce

List the catalogs linked to a WhatsApp numberGETLink a catalog to a WhatsApp numberPOSTUnlink a catalog from a WhatsApp numberDELETEGet a number's commerce settingsGETUpdate a number's commerce settingsPUT

Conversions

Get CTWA conversions datasetGETProvision CTWA datasetPOSTList conversion eventsGETSend WhatsApp conversion eventPOST

Account Events

List account notificationsGET

Phone Numbers

Get number statusGETRegister a connected WhatsApp number on the Cloud APIPOSTMove a number to another profilePATCHRequest a Meta re-verification code for a BYO WhatsApp numberPOSTVerify the Meta re-verification code for a BYO WhatsApp numberPOST

Calling

Get calling config for an accountGETEnable calling on a numberPOSTUpdate calling configPATCHDisable calling on a numberDELETECheck call permissionGETList call history for an accountGETInitiate outbound callPOSTGet a single callGETEstimate per-minute costGETGet calling config for a numberGETGet a call recordingGETStart caller-ID verification for a customer-brought numberPOSTConfirm the caller-ID verification codePOST

Flows

List flowsGETCreate flowPOSTGet flowGETUpdate flowPATCHDelete flowDELETEGet flow JSON assetGETUpload flow JSONPUTGet flow preview URLGETList flow versionsGETPublish flowPOSTDeprecate flowPOSTSend flow messagePOSTList flow responsesGETGet Flows encryption key statusGETRegister a Flows encryption keyPOST

Sandbox

List your sandbox sessionsGETStart a sandbox activationPOSTRevoke a sandbox sessionDELETE

Other

Get pricing analyticsGET
Dashboard
llms.txtOpenAPI
OverviewPlatformsAPI ReferenceResources
WhatsApp

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.


GET
/v1/whatsapp/pricing-analytics

Authorization

bearerAuth
AuthorizationBearer <token>

API key authentication: send your Zernio API key in the Authorization header, prefixed with Bearer.

In: header

Query Parameters

accountId*string

WhatsApp account ID

start*string

Range start, ISO 8601 date or date-time.

Formatdate-time
end*string

Range end, ISO 8601 date or date-time. Must be after start.

Formatdate-time
granularity*string

Value in

  • "HALF_HOUR"
  • "DAILY"
  • "MONTHLY"
dimensions?string

Comma-separated breakdowns: COUNTRY, PHONE, PRICING_CATEGORY, PRICING_TYPE, TIER. Without it each data point is a total for the interval.

metricTypes?string

Comma-separated: COST, VOLUME. Defaults to both.

pricingTypes?string

Comma-separated filter: REGULAR, FREE_CUSTOMER_SERVICE, FREE_ENTRY_POINT.

pricingCategories?string

Comma-separated filter of Meta pricing categories, for example MARKETING, MARKETING_LITE, UTILITY, AUTHENTICATION, AUTHENTICATION_INTERNATIONAL, SERVICE, REFERRAL_CONVERSION.

countryCodes?string

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    }  ]}
Was this page helpful?

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.