Skip to main content
Every webhook POST includes X-Sendmux-Signature in the form sha256=<hex>. Verify it before you process the event.

What to sign

  • Use the raw request body bytes.
  • Use the webhook signing secret returned when the subscription was created or rotated.
  • Compute HMAC-SHA256 and compare the full sha256=<hex> value.
  • Compare in constant time.
Do not parse and re-serialise the JSON before verification. That can change whitespace or field order and break the signature check.

Example verifier

Common mistakes

  • Reading parsed JSON instead of the raw body.
  • Comparing without the sha256= prefix.
  • Using a normal string comparison for secrets.
  • Processing retries without deduping on X-Sendmux-Event-Id.

Endpoint behaviour

Return a 2xx status once the event is accepted. For longer processing, store the event first, return quickly, and process it after the response. Sendmux retries non-2xx responses and timeouts. See Webhooks setup.