Email Webhooks
Two paths: (1) customer webhooks you configure in the Sendexa dashboard, and (2) the Resend → Sendexa ingress that keeps outbox status accurate.
Real-time delivery
Get notified when messages are sent, delivered, opened, clicked, bounced, or marked as spam.
Signed payloads
Customer webhooks use HMAC-SHA256 in X-Sendexa-Signature. Resend ingress uses Svix signatures.
Resend ingress
Point Resend at Sendexa so provider events update message status, metrics, and suppressions.
Configure this URL in the Resend Webhooks dashboard so delivery events update EmailMessage rows, write EmailEvent timeline entries, and auto-suppress hard bounces / complaints.
POST https://api.sendexa.co/webhooks/resend
Signing secret
RESEND_WEBHOOK_SECRET=whsec_… on the API. Subscribe to: email.sent, email.delivered, email.opened, email.clicked, email.bounced, email.complained, email.failed.Create a webhook in the dashboard under Developers → Webhooks and subscribe to delivery events. Sendexa POSTs signed JSON when email status changes (via Resend ingress or direct provider updates).
Example payload
{"channel": "EMAIL","event": "email.delivered","messageId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890","providerMessageId": "re_xxxxxxxxxxxx","to": ["user@example.com"],"subject": "Welcome to Sendexa","status": "DELIVERED"}
Events
| Sendexa event | Provider type | Meaning |
|---|---|---|
| MESSAGE_SENT | email.sent | Accepted by provider |
| MESSAGE_DELIVERED | email.delivered / opened / clicked | Delivered or engagement |
| MESSAGE_FAILED | email.bounced / failed / complained | Hard failure or spam |
Verify signature
Header:
const crypto = require("crypto");function verifyWebhook(rawBody, signature, secret) {const expected = crypto.createHmac("sha256", secret).update(rawBody).digest("hex");return crypto.timingSafeEqual(Buffer.from(expected),Buffer.from(signature || ""),);}
POST /v1/email/send — send a message
GET /v1/email/status/:messageId — poll status
GET /v1/email/history · GET /v1/email/metrics · POST /v1/email/domains/:id/auto-configure