Get usage
Metered messages over a period, per number.
Every message sent or received, counted per number and grouped by usage kind, direction and whether the provider bills it. Test sends are left out. The period defaults to the 30 days ending now, and is at most 366 days. Metered only: what you are charged is the wallet's.
from?stringA date or an RFC 3339 time
to?stringA date or an RFC 3339 time
number?stringOne number: a sender ID or a WhatsApp phone_number_id.
length <= 64X-Request-Id?stringYour id for this request; it becomes the request_id of any error. Without it the server makes one.
curl -X GET 'https://v3.ghala.io/v1/usage'{ "from": "2019-08-24T14:15:22Z", "to": "2019-08-24T14:15:22Z", "number": "string", "totals": [ { "kind": "whatsapp/marketing", "direction": "outbound", "billable": true, "messages": 0, "units": 0, "charged_minor": 0 } ], "numbers": [ { "number": "string", "totals": [ { "kind": "whatsapp/marketing", "direction": "outbound", "billable": true, "messages": 0, "units": 0, "charged_minor": 0 } ] } ]}Get analytics GET
Activity over a period. Days are counted in East Africa Time. Deltas compare with the equal-length window before, and are null when it had nothing.
Get usage cycle GET
This cycle's usage against the workspace's plan. Cycles start when the plan was assigned (or the workspace was made, with no plan) and run the plan's cycle_days, 30 by default. Sent units per kind, per number and campaigns, against the plan's allowances. Counted, never enforced.