Developer
Webhooks
Mailyte calling your system the moment mail is delivered, bounced or opened.
What this is
A webhook is Mailyte telling your system that something happened, as it happens.
Rather than your application asking "has that message been delivered yet?" every few minutes, you give Mailyte a URL and it calls you when the answer changes.
How it works
You register an endpoint URL and choose which events it should receive. When a matching event occurs, Mailyte sends it to that URL.
The events available are the real stages of a message's life:
email.accepted— Mailyte has taken the message for sendingemail.delivered— the receiving server accepted itemail.deferred— delivery was delayed and will be retriedemail.bounced— it was refusedemail.dropped— it was not sent at allemail.rejected— it was refused before sendingemail.inbound— mail arrived for you
Each endpoint shows when it was last triggered and a success rate, which together answer the only two questions that matter: is it being called, and is your server accepting the calls.
Delivery is best effort and deliberately kept separate from Mailyte's own work — if your endpoint is down, that is not allowed to disturb mail flow. Build your handler to cope with an occasional repeat rather than assuming exactly-once.
Failures are retried with a growing delay, and a sustained run of failures disables the endpoint. One success resets that count, so an endpoint that fails twice and recovers keeps going; one that is down for a long stretch is switched off rather than being called forever. If an endpoint of yours has gone quiet after an outage, check whether it is still enabled.
Set it up
- Build the endpoint first. It should accept a POST, return quickly, and do the slow work afterwards.
- Go to Developer, open the Webhooks tab, and add the endpoint URL. Use HTTPS.
- Choose only the events you will act on. Subscribing to everything and ignoring most of it makes your logs harder to read and your server busier than it needs to be.
- Save it and send yourself a test message that will produce one of those events.
- Check Last triggered moved and the success rate is not zero.
- Make your handler tolerant of a repeated event — treat the same event arriving twice as a no-op rather than as two things happening.
When something is wrong
Nothing is arriving. Check Last triggered. If it is empty, no matching event has occurred — confirm with Email logs that the mail you expected actually moved.
The success rate is low. Your endpoint is refusing or timing out. Return a 2xx quickly and queue the work; a handler that does five seconds of processing before responding will look like a failing endpoint.
Events arrive twice. Expected. Make the handler idempotent — key on the event identifier and ignore one you have already handled.
You are receiving events you did not want. Edit the subscription rather than filtering them in your code.
You need to react to something not in the list above. Say so in a ticket. The event list is what Mailyte genuinely emits, and it is better to ask for a new one than to poll around the gap.