Verifying Webhook Signatures
Every webhook delivery is signed with HMAC-SHA256 so you can verify it came from Wistfare Mail.
How Signatures Work
Each webhook delivery includes these headers:
| Header | Value |
|---|---|
X-Webhook-Signature | sha256=<hex digest> |
X-Webhook-Event | Event type (e.g., email.delivered) |
X-Webhook-Id | Unique event ID (for idempotency) |
The signature is computed as HMAC-SHA256(secret, raw_request_body). The signing secret is returned once when you create the webhook — store it securely.
Verification Examples
Retry Behavior
If your endpoint returns a non-2xx status (or times out after 10 seconds), the delivery is retried up to 3 times with exponential backoff: 1 second, 5 seconds, then 30 seconds.
4xx responses (except 429) are not retried — fix the issue on your side and we'll send the next event normally.
Idempotency
The X-Webhook-Id header uniquely identifies each event. If you process events in a queue, dedupe by this ID to handle retries gracefully.
Testing Locally
Use a tunnel like ngrok or webhook.site to receive events on your dev machine: