Skip to main content
When SendX sends webhooks to your endpoint, we include a secure HMAC-SHA256 signature. This allows you to verify that the webhook truly came from SendX and that the payload hasn’t been altered in transit. This article explains how SendX signs webhook requests and how you can verify them in your own server — with ready-to-use examples in Python and Node.js.

Why Signature Verification Matters

Webhook signature verification ensures:
  • ✅ The request is authentic (it came from SendX).
  • ✅ The payload has not been altered during transmission.
  • ✅ You can safely process the event data without risk of spoofing.

How SendX Signs Webhooks

Every webhook request sent from SendX includes a cryptographic signature in its HTTP headers. Here’s how the signature is generated:
  1. The webhook payload (JSON body) is taken as-is.
  2. SendX computes an HMAC-SHA256 hash of this body using your team’s unique API key as the secret.
  3. The result is hex-encoded and added to the request headers.
Example request headers:

How to Verify a Webhook on Your Server

When your server receives a webhook from SendX:
  1. Capture the raw body of the POST request (without parsing it).
  2. Retrieve the following headers:
    • X-SendX-Signature
    • X-SendX-Signature-Alg
  3. Recompute the HMAC using your SendX Team API Key.
  4. Compare the recomputed signature with the one in the header using a constant-time comparison.
If they match — the webhook is valid.

Example: Verification Script

Common Issues & Fixes