Skip to main content
Bounces and spam complaints damage your sending reputation. SendFlit suppresses addresses that hard bounce or get a complaint, so future sends to them are refused with 403. In this tutorial you add a webhook endpoint that records those events in your own database and tells you when something needs attention.
You’ll need: a publicly reachable HTTPS URL for your server, and a webhook endpoint created in the dashboard with the events email.bounced, email.complained, and email.delivered. Copy the signing secret when you create it.
1

Add the endpoint in the dashboard

In the dashboard, add an endpoint pointing to https://yourapp.example.com/webhooks/sendflit. Select the events above and choose the SendFlit payload format. Copy the signing secret.
2

Verify and route each event

The body must be read raw. Don’t use a JSON parser before the signature check.
3

Make processing idempotent

Deliveries can repeat. Record each event’s email id and type, and skip events you’ve already handled:
Insert the row before acting. If the insert fails because the row exists, return 200 without repeating the work.
4

Test the endpoint

Send a test email to an address that will bounce, and confirm your handler receives email.bounced and returns 200. Then send a request with a wrong signature, such as curl with a made-up X-Sendflit-Signature, and confirm it returns 401.

What to do with each event

Read the full list in the webhook reference.