Contents

Webhook events3 events

Signed POST requests SMS21 sends to your endpoints. Verify the SMS21-Signature header before trusting a payload.

Message received

postmessageReceived

Configure endpoints (HTTPS only) in the dashboard under Developers → Webhooks.

1. Verify SMS21-Signature against the raw body before parsing JSON. 2. Reject timestamps older than 5 minutes (replay protection). 3. Ignore event IDs you have already processed: deliveries are at-least-once and may arrive out of order.

Event: message.received. Unlike message.* status events, this payload carries the sender's number and the text — that is the message being delivered to you.

Payload15

  • idstringrequired

    Event ID; deduplicate on it.

  • eventstringrequired

    message.received

  • timestampstring (date-time)required
  • inboundIdstringrequired

    Inbound message ID.

  • fromstringrequired
  • tostringrequired
  • textstringrequired
  • keywordstring | nullrequired
  • actionstringrequired

    noneopt_outopt_in

  • channelstringrequired

    smswhatsappwhatsapp_connect

  • deviceIdstring | nullrequired

    The linked WhatsApp device that received it (whatsapp_connect).

  • senderNamestring | nullrequired
  • groupIdstring | nullrequired

    WhatsApp Connect: the group it was posted in (from is the member who wrote it); null for a direct message.

  • mediaobject | nullrequired
    4 nested fields
    • typestringrequired

      imagevideoaudiodocumentsticker

    • mimeTypestring | nullrequired
    • filenamestring | nullrequired
    • urlstring | null (uri)required

      GET it with an API key of the project (scope reports:read): /v1/inbound/{inboundId}/media.

  • sampleboolean

    Only on example events sent from the dashboard; they reference nothing.

    true

Payload
{
  "id": "evt_01k55q8y4m3d9v7x2c6b0n1r8t",
  "event": "message.received",
  "timestamp": "2026-09-15T10:30:00.000Z",
  "inboundId": "inb_01k55q8y4m3d9v7x2c6b0n1r8t",
  "from": "919876543210",
  "to": "919812345678",
  "text": "STOP",
  "keyword": "STOP",
  "action": "opt_out",
  "channel": "sms",
  "deviceId": null,
  "senderName": null,
  "groupId": null,
  "media": null
}

Message status changed

postmessageStatus

Configure endpoints (HTTPS only) in the dashboard under Developers → Webhooks.

1. Verify SMS21-Signature against the raw body before parsing JSON. 2. Reject timestamps older than 5 minutes (replay protection). 3. Ignore event IDs you have already processed: deliveries are at-least-once and may arrive out of order.

Events: message.submitted, message.sent, message.delivered, message.failed, message.rejected, message.expired, message.received.

Payload9

  • idstringrequired

    Unique per event and identical on every retry of it: store it and ignore events you have already processed.

  • eventstringrequired

    Event type.

    message.submittedmessage.sentmessage.deliveredmessage.failedmessage.rejectedmessage.expiredmessage.received

  • timestampstring (date-time)required

    When the status changed. Events may arrive out of order; compare timestamps.

  • messageIdstringrequired

    The message.

  • statusstringrequired

    Unified status across providers:

    StatusMeaning
    queuedAccepted, waiting to be processed.
    processingBeing routed to a provider.
    submittedHanded to a provider. Also used when a hand-over timed out: SMS21 never resends an uncertain submission.
    sentThe provider confirmed it left their platform.
    deliveredDelivered to the handset (final).
    failedCould not be delivered (final).
    rejectedRefused: invalid number, policy or DLT mismatch; not retried (final).
    expiredNo final report within the validity period (final).

    queuedprocessingsubmittedsentdeliveredfailedrejectedexpired

  • channelstringrequired

    Channel.

    smswhatsappwhatsapp_connect

  • typestringrequired

    Message type.

    otptransactionalpromotional

  • environmentstringrequired

    test: sandbox traffic from a test key (never delivered, never charged).

    livetest

  • failureobject | nullrequired
    1 nested field
    • codestringrequired

      MESSAGE_REJECTEDDELIVERY_FAILEDMESSAGE_EXPIRED

Payload
{
  "id": "evt_01k55q8y4m3d9v7x2c6b0n1r8t",
  "event": "message.delivered",
  "timestamp": "2026-09-15T10:30:00.000Z",
  "messageId": "msg_01k55q8y4m3d9v7x2c6b0n1r8t",
  "status": "delivered",
  "channel": "sms",
  "type": "otp",
  "environment": "live",
  "failure": null
}

Test event

postwebhookTest

Configure endpoints (HTTPS only) in the dashboard under Developers → Webhooks.

1. Verify SMS21-Signature against the raw body before parsing JSON. 2. Reject timestamps older than 5 minutes (replay protection). 3. Ignore event IDs you have already processed: deliveries are at-least-once and may arrive out of order.

Sent when you click Send test event; signed like every other event.

Payload5

  • idstringrequired

    Event ID.

  • eventstringrequired

    webhook.test

  • timestampstring (date-time)required

    When the test was requested.

  • endpointIdstringrequired

    The endpoint being tested.

  • projectIdstringrequired

    Project of the endpoint.

Payload
{
  "id": "evt_01k55q8y4m3d9v7x2c6b0n1r8t",
  "event": "webhook.test",
  "timestamp": "2026-09-15T10:30:00.000Z",
  "endpointId": "whk_01k55q8y4m3d9v7x2c6b0n1r8t",
  "projectId": "prj_01k55q8y4m3d9v7x2c6b0n1r8t"
}