Delivery reports
Every Message moves through statuses until it ends in a final one. Learn about each change from webhooks, or ask for a Message with GET /v1/messages/{messageId} using the scope messages.view.
Statuses
| Status | Means | Charged |
|---|---|---|
queued |
Accepted, not yet handed to a Provider. Includes a Message being retried. | No |
submitted |
Handed to a Provider, waiting for its delivery report. | Yes |
delivered |
The Operator delivered it. Final. | Yes |
undelivered |
The Operator could not deliver it: the phone was off too long, the number is invalid, or the Operator rejected it. errorCode holds the Operator's code. Final. |
Yes |
unknown |
No delivery report within 72 hours. A report that arrives later still updates it. | Yes |
not_sent |
It never reached a Provider, so it was not charged. reason says why. Final. |
No |
Delivery reports by webhook
Subscribe an endpoint to the events you need:
| Event | Sent when |
|---|---|
message.submitted |
the Message is handed to a Provider |
message.not_sent |
the Message will never be sent |
message.delivered |
the Operator reports it delivered |
message.undelivered |
the Operator reports it undelivered |
Each event carries the message_id, so you can match it to the Message in your system. Webhook events lists every field.
Asking for a Message
curl https://giosms.com.bd/v1/messages/0193a6f2-6d2b-7e5c-8a9f-3b7c2d4e6f80 \
-H "Authorization: Bearer gsk_live_your_key"
The Message IDs come from the webhook events. A Message of another Account, or one older than GioSMS keeps for searching, is 404 not_found. Prefer webhooks to asking again and again: asking counts against your rate limit.