Messages

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.

Query Parameters

from?string

A date or an RFC 3339 time

to?string

A date or an RFC 3339 time

number?string

One number: a sender ID or a WhatsApp phone_number_id.

Lengthlength <= 64

Header Parameters

X-Request-Id?string

Your 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        }      ]    }  ]}