Prerequisites
In order to get started, you will need:- A Lettermint account with access to a Project and Route
- A publicly reachable HTTPS endpoint (use a tunnel like ngrok for local dev)
- Basic familiarity with HTTP and JSON
1. Quick Start
Create a webhook on a specific Route and verify delivery with the built-in Test Webhook.Create a webhook in the Dashboard
- Go to Dashboard → Your Project → Routes → select a Route → Webhooks.

- Click “Create webhook”.

- Now, enter the details of your webhook
- Name: e.g., “Prod Events”
- URL: your HTTPS endpoint (e.g., https://api.yourproject.com/webhooks/lettermint)
- Events: one or more event types to receive
- Enabled: keep on to start receiving events
- Save.

Send a test delivery
- From Webhook details → click “Test Webhook”.
- You should receive a JSON payload like below.
2. Webhook Details
The following details may be useful to you:Scope
Webhooks are attached to a specific Route within a Project. This way you can subscribe to events for a specific Route without affecting other Routes, e.g. bounces for newsletters do not affect bounces for payments.Fields
Field | Description |
---|---|
Name | Display name of your webhook |
URL | The URL we make the POST call to |
Events | An array of all possible events |
Enabled | A boolean indicating if your webhook is enabled or disabled |
Secret | Each webhook has a secret you can rotate |
Deliveries | A list of recent deliveries, including status, HTTP status code, duration, and attempt number |
Use multiple webhooks per route to isolate consumers (e.g., analytics vs. billing).
3. Implementing a Webhook
Node.js (Express)
- Parses the JSON payload and logs the event
- Returns 200 quickly so Lettermint doesn’t retry unnecessarily
Framework Integration
Next.js (Route Handler)
Use the Test Webhook button in the dashboard to trigger webhook.test and confirm this logs as expected.
Delivery & Retries
Lettermint retries failed webhook deliveries with exponential backoff. We mark an attempt as failed if your endpoint responds with a non-2xx status or times out. Retry schedule (12 attempts total):- 1 minute
- 2 minutes
- 5 minutes
- 10 minutes (2x)
- 15 minutes
- 30 minutes
- 1 hour
- 2 hours
- 4 hours
- 6 hours
- 10 hours
Troubleshooting
Webhook is disabled- Ensure the webhook’s Enabled toggle is on. Disabled webhooks will not send deliveries.
- Use “Test Webhook” on the Webhook details page.
- Confirm your endpoint returns 2xx. 4xx/5xx will be marked as failed and retried.
- See Signed webhooks
- Your endpoint must return 200-level status quickly. Do heavy work async.
- Implement idempotency using the event id to avoid duplicate effects.
Next Steps
- Signed Webhooks: Verify the authenticity of webhook payloads.
- All webhook events: Learn about all the events Lettermint sends.