Help Center

Webhooks & Signature Verification

Receive signed outbound status callbacks, inbound customer messages, and workspace CRM webhook events securely.

Webhook Options in WBMSG

WBMSG supports two REST API webhook endpoints configured directly on your API Credentials (plus per-message status url overrides), as well as Workspace CRM Webhook Actions for automation events.

Status Callbacks (Callback URL) deliver form-encoded POST requests (or GET query parameters when method=GET is specified on send) as each API message transitions through queued, sent, delivered, read, failed, and undelivered.

Inbound Message Forwarding (Inbound URL) pushes incoming WhatsApp messages from customers to your HTTPS endpoint using form-encoded fields: From, To, Text, Type ("whatsapp"), and MessageUUID.

Workspace CRM Webhook Actions (configured under Settings → Webhook Actions) send JSON HTTP POST payloads for CRM events such as conversation created, message received, conversation resolved, deal won, and contact created.

ℹ️Public API webhook endpoints require valid public https:// URLs and must return an HTTP 2xx response within 10 seconds.

Retries & Delivery Behavior

Webhook requests do not follow HTTP redirects and time out after 10 seconds. If your endpoint returns a non-2xx status or experiences a network timeout, WBMSG automatically retries delivery with exponential backoff intervals of 60 seconds, 120 seconds, and 240 seconds.

Ensure your endpoint acknowledges requests with HTTP 200 quickly and processes heavy downstream work asynchronously.

Outbound Status Callback Fields

Status callbacks include an incrementing Sequence counter and UTC timestamps so your webhook consumer can ignore stale out-of-order deliveries cleanly.

FieldTypeDescription
MessageUUIDstringUnique message UUID returned by POST /Message/.
From / TostringYour business number digits and the recipient number.
TypestringSet to "whatsapp".
StatusstringCurrent state: queued, sent, delivered, read, failed, or undelivered.
ErrorCode / ErrorMessagestringIncluded on failed or undelivered events when a delivery error is available.
SequencestringMonotonic transition sequence number for the message.
ConversationID / Origin / ExpirationstringWhatsApp conversation ID, origin category, and unix expiration timestamp when supplied by Meta.

Verify Webhook Signatures (HMAC-SHA256)

Every Public API callback request includes X-WBMSG-Signature and X-WBMSG-Signature-Nonce headers signed with your credential's Auth Token so you can authenticate incoming webhook traffic.

To verify the signature, take your exact configured webhook URL without any query string or hash fragment, append the nonce string from X-WBMSG-Signature-Nonce, compute an HMAC-SHA256 digest using your Auth Token as the key, and Base64-encode the result.

javascriptVerify X-WBMSG-Signature in Node.js
import crypto from "node:crypto";

export function verifyWbmsgWebhook({ webhookUrl, headers, authToken }) {
  const sig = headers["x-wbmsg-signature"];
  const nonce = headers["x-wbmsg-signature-nonce"];
  if (!sig || !nonce) return false;

  const baseUrl = webhookUrl.split("?")[0].split("#")[0];
  const expected = crypto
    .createHmac("sha256", authToken)
    .update(baseUrl + nonce)
    .digest("base64");

  const a = Buffer.from(sig);
  const b = Buffer.from(expected);
  return a.length === b.length && crypto.timingSafeEqual(a, b);
}
Still need help with Developer API?
Start free with 500 monthly messages or message our team directly.