To create and manage webhooks, see the webhooks guide.
Prerequisites
- A webhook created in your Nuntly account. See the webhooks guide.
- The signing secret for that webhook (displayed once at creation)
- An HTTPS endpoint on a publicly accessible server
Verify the webhook signature
Every request Nuntly sends includes anx-nuntly-signature header. This is an HMAC-SHA256 signature computed from the raw request body using your webhook’s signing secret.
You must verify this signature before processing the event. This prevents your endpoint from acting on forged requests.
Implement the endpoint
If you use
express.json() as global middleware, it will consume the raw body before your route handler runs. Apply express.text() specifically
to your webhook route, as shown above.Best practices
- Respond quickly. Return a
200response as soon as you receive and verify the event. If processing takes time, queue the work for background execution. - Always verify the signature. Never skip signature verification, even in development.
- Handle duplicates. Nuntly may retry failed deliveries. Use the event ID to deduplicate if needed.
- Log raw payloads. Store the raw event body for debugging and auditing.
- Handle bounces and complaints. When you receive an
email.bouncedoremail.complainedevent, stop sending to that address to protect your sender reputation.
Monitor webhook delivery
You can see whether your webhook events are being delivered successfully in the Webhooks tab of the Observability page.Learn more
Set up webhooks
Create, edit, and configure webhooks from the dashboard or SDK
Monitor your activity
Track webhook delivery status and email event logs
