React to email events as they happen. Link your application logic to opens, clicks, and bounces with our robust webhook pipeline.
const express = require('express');
const app = express();
app.post('/webhooks/simplysend', express.json(), (req, res) => {
const event = req.body;
// Handle the event
switch (event.type) {
case 'email.delivered':
console.log('Email to ' + event.data.to + ' delivered!');
break;
case 'email.opened':
console.log('User opened the email');
break;
default:
console.log('Received event ' + event.type);
}
res.status(200).send('Event Received');
});Receive complete event data within seconds of the email action occurring.
If your server is down, we'll retry the delivery with exponential backoff.
Verify every request with a secret signature to ensure it came from Simply Send.