Get analytics
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.
period?string"today""last_7_days""last_30_days""last_90_days""this_month""last_month""this_year""all_time"from?stringThe first day of a picked range, given with to; it takes the place of period.
dateto?stringThe last day of a picked range, included. A range is at most 731 days.
datechannel?stringOne channel, as GET /channels lists them (sms, whatsapp, ...); every channel when absent. Any other is 400 invalid_value.
X-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/analytics'{ "range": { "period": "today", "from": "2019-08-24", "to": "2019-08-24", "previous_from": "2019-08-24", "previous_to": "2019-08-24", "granularity": "day", "tz": "Africa/Dar_es_Salaam" }, "totals": { "messages": 0, "delivered": 0, "failed": 0, "parts": 0, "spend_minor": 0, "new_contacts": 0 }, "previous": { "messages": 0, "delivered": 0, "failed": 0, "parts": 0, "spend_minor": 0, "new_contacts": 0 }, "deltas": { "messages_pct": 0, "delivered_pct": 0, "failed_pct": 0, "spend_pct": 0, "new_contacts_pct": 0 }, "series": [ { "messages": 0, "delivered": 0, "failed": 0, "parts": 0, "spend_minor": 0, "new_contacts": 0, "bucket": "2019-08-24" } ], "breakdowns": { "messages_by_status": { "property1": 0, "property2": 0 }, "messages_by_source": { "property1": 0, "property2": 0 } }}Get overview GET
The dashboard header.
Get usage GET
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.