Skip to content

Webhooks ​

The Gateway POSTs to your webhook URL when a message status changes or a reply arrives. Every webhook carries the same headers as Signature, signed with the secret of the client's latest usable API key (X-GW-Key-ID says which), plus X-GW-Event-ID equal to eventId. Always verify before trusting the body.

Answer HTTP 2xx once stored. Otherwise (or on timeout) the Gateway retries with growing gaps (default up to 12 attempts within 24 hours). Use eventId to drop duplicates. A sample receiver is in Test on SANDBOX step by step.

The Gateway can cap how many webhooks per second it sends to each client (webhook TPS, set by the Gateway admin; no cap by default). If your receiver has a limit, tell us the rate it takes. Webhooks over the cap wait a moment in the queue and follow; this is not a retry and nothing is lost.

message.status ​

json
{
  "eventId": "e1f0a9c2-0000-4000-8000-000000000001",
  "type": "message.status",
  "messageId": "b7e1c2d4-0000-4000-8000-000000000001",
  "clientRef": "smsup-0001",
  "operator": "SANDBOX",
  "stage": "delivered",
  "status": "DELIVERED",
  "messageStatus": "DELIVERED",
  "code": "000",
  "providerCode": "000",
  "parts": 1,
  "occurredAt": "2026-11-30T10:00:03+07:00"
}
FieldMeaning
stagesubmitted (provider took it) → sent (reached the network) → delivered (reached the handset) or failed
statusresult of this event: PENDING, DELIVERED, FAILED, UNKNOWN
messageStatusoverall message status after this event, e.g. SUBMITTED, SENT, DELIVERED, FAILED, EXPIRED, SUBMIT_FAILED, UNKNOWN
codeGateway code on failure, e.g. UNDELIVERED, EXPIRED, SENDER_SUSPENDED, TIMEOUT, NO_DR
providerCoderaw provider code
batchRefpresent when the message was sent with a batchRef

You are only told when the status changes; duplicate or late DRs do not cause another webhook.

message.inbound (MO) ​

A recipient replied, e.g. with STOP. Sent to the inbound webhook (or the status webhook if none is set).

json
{
  "eventId": "e1f0a9c2-0000-4000-8000-000000000002",
  "type": "message.inbound",
  "inboundId": "bfce6417-0000-4000-8000-000000000001",
  "from": "66812340011",
  "fromMasked": "668xxxx0011",
  "to": "SANDBOX",
  "text": "STOP",
  "keyword": "STOP",
  "messageId": "b7e1c2d4-0000-4000-8000-000000000001",
  "receivedAt": "2026-11-30T10:00:08+07:00"
}

messageId is the message being replied to (when it can be matched); keyword is set when the text is a command such as STOP.

sender.suspended ​

A sender name was suspended automatically after the provider reported it suspended enough times (default 3 within 60 minutes). Further messages with that name get 422 SENDER_SUSPENDED until an administrator lifts it. Webhook only; SMPP clients are not told.

json
{
  "eventId": "e1f0a9c2-0000-4000-8000-000000000003",
  "type": "sender.suspended",
  "senderId": "3cb73216-0000-4000-8000-000000000001",
  "sender": "SANDBOX",
  "providerCode": "sandbox",
  "reason": "SANDBOX err SENDER_SUSPENDED x3 in 60 min",
  "occurredAt": "2026-11-30T10:05:00+07:00"
}