Sending

Webhooks

Get signed HTTP notifications when emails are delivered, bounce or fail.

Add an endpoint in Webhooks (or with POST /v1/webhooks) and choose its events. SNDR sends each event as a signed POST with a JSON body.

Events

EventSent when
email.deliveredThe recipient’s mail server accepted the email.
email.bouncedThe address doesn’t exist (permanent failure). It’s added to your suppression list.
email.failedThe email couldn’t be sent, for example a rejection or signing problem.
email.unsubscribedA recipient used the unsubscribe link. The address is added to your suppression list.
Payload
{
  "id": "evt_3f9a1c2b7d4e",
  "type": "email.delivered",
  "created_at": "2026-01-15T10:30:04Z",
  "data": {
    "email_id": "eml_01HXKQ8B3N",
    "to": ["customer@example.com"]
  }
}

Deliveries are retried on failure, so the same event can arrive twice. Use id to process each event once.

Verify the signature

Each request has an X-Sndr-Signature header: t=<unix time>,v1=<hex HMAC-SHA256>. The HMAC is computed over t, a dot, and the raw body, with your endpoint’s secret. Always check it before trusting the payload.

import { verifyWebhookSignature } from '@rkiza/sndr';

// rawBody: the exact request body, before JSON.parse
const valid = verifyWebhookSignature(
  rawBody,
  request.headers.get('x-sndr-signature') ?? '',
  process.env.SNDR_WEBHOOK_SECRET,
);
if (!valid) return new Response('Invalid signature', { status: 401 });
Reject requests whose t is more than 5 minutes old to stop replays.

The secret

The full secret is shown once, when you create the endpoint (secret in the API response). Lists only show secret_prefix, which can’t be used to verify.

Rotate the secret

  1. Stage a new secret

    Open the endpoint’s Signing keys and choose Generate replacement secret. Requests are now signed with both secrets (v1 and v1s).

  2. Accept both

    Update your receiver to accept either secret.

  3. Promote

    Choose Make primary. The old secret stops signing new deliveries.