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.

Resend → Sendexa ingress

Configure this URL in the Resend Webhooks dashboard so delivery events update EmailMessage rows, write EmailEvent timeline entries, and auto-suppress hard bounces / complaints.

text
POST https://api.sendexa.co/webhooks/resend
Customer webhooks (your app)

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

JSON
{
"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 eventProvider typeMeaning
MESSAGE_SENTemail.sentAccepted by provider
MESSAGE_DELIVEREDemail.delivered / opened / clickedDelivered or engagement
MESSAGE_FAILEDemail.bounced / failed / complainedHard failure or spam

Verify signature

Header:

X-Sendexa-Signature
(HMAC-SHA256 hex of the raw body with your webhook secret).

JavaScript
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 || ""),
);
}
Related APIs

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