Calling usage and cost
Aggregated calling usage across your numbers, both channels (WhatsApp Business Calling + regular phone/PSTN): call counts, answered counts, minutes, and cost. Use it for cost visibility or to rebill your own customers per number.
Costs come from each call's billing snapshot, so this endpoint always
agrees with the invoice: billableUSD is what Zernio bills;
metaUSD is the WhatsApp per-minute charge Meta bills directly to
your WABA (display only, never billed by Zernio).
Optional groupBy returns a breakdown by UTC day, by your number, or
by channel. Defaults to the last 30 days.
API key authentication - use your Zernio API key as a Bearer token
In: header
Query Parameters
Start of the window (inclusive). Default 30 days before until.
date-timeEnd of the window (exclusive). Default now.
date-time"whatsapp" | "pstn"Scope to calls involving this number (typically one of YOUR numbers). E.164, leading + optional.
"day" | "number" | "channel"Response Body
application/json
application/json
import Zernio from '@zernio/node';const zernio = new Zernio({ apiKey: process.env.ZERNIO_API_KEY });const { data } = await zernio.usage.getCallsUsage();console.log(data);{
"since": "2019-08-24T14:15:22Z",
"until": "2019-08-24T14:15:22Z",
"groupBy": "day",
"totals": {
"calls": 0,
"answered": 0,
"minutes": 0,
"billableUSD": 0,
"metaUSD": 0
},
"groups": [
{
"key": "string",
"calls": 0,
"answered": 0,
"minutes": 0,
"billableUSD": 0,
"metaUSD": 0
}
]
}{
"error": "Unauthorized"
}Account billing snapshot (plan, cycle, balance, caps, status) GET
The billing "wallet/statement" view: current plan, billing cycle, accrued balance + remaining credits this period, spend caps, and payment / access status. This is the billing half of the legacy `/v1/usage-stats` snapshot — the per-product consumption half is metering and lives on `GET /v1/usage`. Usage-based (Metronome) accounts get a populated `balance`; legacy Stripe accounts get `balance: null` plus a deprecated `legacy.limits` block and, when payment-blocked, `status.openInvoiceUrl` / `status.declineReason`.
SMS usage (volumes) GET
Aggregated SMS/MMS volumes across your numbers: sent, received, and total message counts, with an optional breakdown by UTC day or by number. Defaults to the last 30 days. Volumes only, deliberately: SMS cost is carrier-rated asynchronously and billed to your invoice, so per-message cost is not available here. Calling usage (GET /v1/usage/calls) does include billable cost.