What is a webhook?
Webhooks are HTTP callbacks that allow AutoSend to send real-time notifications to your application when specific events occur. Instead of continuously polling AutoSend’s API to check for updates, webhooks push data to your application immediately when events happen. AutoSend uses webhooks to push real-time notifications to your application about email and contact events. All webhooks use HTTPS and deliver a JSON payload that can be used by your application.You can use webhooks to:
- Automatically remove bounced email addresses from your mailing lists
- Track email engagement in real-time (opens, clicks, unsubscribes)
- Sync contact changes across multiple systems
- Create alerts in your messaging or incident tools based on event types
- Store all events in your own database for custom reporting/retention
- Trigger workflows when specific events occur (e.g., send Slack notification when email bounces)
- Maintain compliance logs for audit purposes
How to create and setup webhooks
1
Create a local endpoint to receive requests
In your local application, create a new route that can accept POST requests.
On receiving an event, you should respond with an
HTTP 200 OK status within 10 seconds to signal to AutoSend that the event was successfully delivered.2
Register your development webhook endpoint
- Navigate to Webhooks from the AutoSend sidebar

- Click the “New Webhook” button
- Fill in the webhook details:
- Name: A friendly name for identification (e.g., “Development Email Tracker”)
- Endpoint URL: Your publicly accessible HTTPS URL (use your ngrok URL for development)
- Events: Select the events you want to receive notifications for
- Click “Create Webhook”

- Important: Copy the secret token and save it securely - you’ll need it to verify webhook requests
After creating your webhook, the secret token will be displayed. Make sure to copy and save it securely. You can also reveal it later by editing the webhook and clicking “Reveal Secret”.
3
Test that your webhook endpoint is working properly
Monitor Your Endpoint
Start monitoring your local endpoint to see incoming webhook requests:Trigger Test Events
Test your webhook by performing actions in AutoSend that trigger events:- For Email Events: Send a test campaign or transactional email
- For Contact Events: Create, update, or delete a test contact in your project
- Watch your logs: Your endpoint should receive webhook requests for these events
4
Deploy your webhook endpoint
After testing locally, deploy your webhook endpoint to your production environment:
- Vercel/Netlify: Deploy your API routes
- AWS Lambda: Deploy as serverless function
- Heroku/Railway: Deploy your application
- Docker: Containerize and deploy to your infrastructure
- Uses HTTPS (required)
- Responds within 10 seconds
- Implements proper error handling
- Verifies webhook signatures
5
Register your production webhook endpoint
Once deployed, create a new webhook in AutoSend with your production URL:

- Navigate to Webhooks from the AutoSend sidebar

- Click the “New Webhook” button
- Fill in the production details:
- Name: “Production Email Tracker” (or any descriptive name)
- Endpoint URL: Your production webhook URL (e.g.,
https://api.yourapp.com/webhooks/autosend) - Events: Select the events you want to track:
- Email engagement: opened, clicked, unsubscribed
- Deliverability: delivered, bounced, deferred
- Contact events: created, updated, deleted
- Click “Create Webhook”

- Important: Copy the secret token and save it securely - you’ll need it to verify webhook requests
Copy and securely store the webhook secret
- Store it as an environment variable:
WEBHOOK_SECRET=your_secret_here - Never commit it to version control
- Use a secret management service in production (AWS Secrets Manager, etc.)
Managing Your Webhooks
From the Webhooks page, you can:- View all webhooks for your project - displayed as cards showing webhook details
- Edit webhooks - Click the menu (⋮) on a webhook card and select “Edit”
- Delete webhooks - Click the menu (⋮) and select “Delete”
- See webhook status - Each webhook shows “Enabled” or “Disabled” status
- Copy webhook details - Webhook ID and URL are copyable from the card
Best Practices
Respond Quickly
Respond Quickly
Process webhooks asynchronously to respond within 10 seconds:
Always Verify Signatures
Always Verify Signatures
Never trust incoming webhook requests without verification. See the Verify Webhook Requests guide.
Log Everything
Log Everything
Maintain detailed logs for debugging:
Monitor Webhook Health
Monitor Webhook Health
Implement your own monitoring to track webhook delivery success/failure. The webhook model in AutoSend tracks
failureCount, lastSuccessAt, and lastFailedAt which are updated automatically. See Retries and Replays for monitoring examples.FAQ
What events can I subscribe to?
What events can I subscribe to?
AutoSend supports email engagement events (opened, clicked, bounced, delivered, etc.) and contact events (created, updated, deleted). See the Event Types guide for the complete list.
What is the retry schedule?
What is the retry schedule?
If AutoSend does not receive a 200 response from your webhook endpoint, we will automatically retry the delivery. See Retries and Replays for details.
Can I have multiple webhooks?
Can I have multiple webhooks?
Yes, you can create up to 100 webhooks per project. Each webhook can subscribe to different events and point to different endpoints.
Can I change the webhook URL?
Can I change the webhook URL?
No, webhook URLs cannot be changed after creation for security reasons. If you need to change the URL, delete the webhook and create a new one.
How do I get the secret if I lost it?
How do I get the secret if I lost it?
You can reveal your webhook secret:
- Navigate to Webhooks from the AutoSend sidebar
- Click the menu (⋮) on your webhook card
- Select “Edit”
- Click “Reveal Secret” button
- Copy and store it securely
What happens if my endpoint is down?
What happens if my endpoint is down?
AutoSend will retry failed deliveries up to 3 times with exponential backoff (1min, 5min, 15min). After all retries are exhausted, the delivery is marked as failed. See the Retries and Replays guide for details.
Is there a request timeout?
Is there a request timeout?
Yes, webhook requests have a 10-second timeout. Ensure your endpoint responds within this time.
How do I test webhooks locally?
How do I test webhooks locally?
Yes! Use tools like ngrok or localtunnel to expose your local server to the internet, then navigate to Webhooks from the AutoSend sidebar and create a webhook with your ngrok URL. Trigger events by sending emails or managing contacts in AutoSend, and your local endpoint will receive the webhooks.
Are webhooks secure?
Are webhooks secure?
Yes, all webhooks are sent over HTTPS and include an
HMAC-SHA256 signature that you should verify. See Verify Webhook Requests for implementation details.