Message statuses
One set of statuses for every channel, and what each one means.
Every channel uses the same statuses, and a message only moves forward: queued, sent, delivered, read. A late report never moves it back.
status | Meaning |
|---|---|
queued | Ghala has it; not yet with the network |
sent | the network accepted it. Not delivered yet |
delivered | the network confirmed delivery |
read | the person opened it, on channels that report it (WhatsApp, Instagram). Others stop at delivered |
failed | certainly not delivered; failure_reason says why |
expired | it ran out of time before delivery |
unknown | the network may have taken it without saying so. It is charged and never sent again; a later report moves it on |
received | a person sent it to your workspace |
A failure or expiry reported after delivery is ignored. Each step keeps its time: submitted_at, delivered_at, read_at and failed_at.
Why a message failed
failure_reason is one of these, and error says it in plain words. The network's own text is never shown.
failure_reason | |
|---|---|
rejected | the network refused it |
invalid_number | the number cannot receive it |
blocked | the person or the network blocked it |
window_closed | outside the channel's reply window |
undeliverable | the network could not deliver it |
expired | it ran out of time |
provider_error | the network failed |
Price
price_minor is what your workspace paid for the message, in minor units (2235 is TZS 22.35). A message that failed at the network was not charged.
Reading a status
Look one message up:
curl https://v3.ghala.io/v1/messages/beed6233-06e0-4805-aba8-c506fe88ab88 \
-H "Authorization: Bearer $GHALA_KEY"Or list every message of one send by the request_id it answered with:
curl "https://v3.ghala.io/v1/messages?request_id=78e87745e1a902aa033d376d0afbb1ef" \
-H "Authorization: Bearer $GHALA_KEY"/v1/messagesList messagesmessages:read
GET /v1/messages also filters by status, channel, phone, campaign_id, since and until. To be told of each change instead, use webhooks.