MailerLogic sends real-time webhook notifications to your configured endpoint for all email events.
Webhook Scopes:
Customer-Level Webhooks (domain_ids = null or [])
- Receives events from ALL domains
- Simplest setup for single-backend applications
Single Domain Webhooks (domain_ids = [uuid])
- Receives events from ONE specific domain
- Useful for isolated domains
Domain Group Webhooks (domain_ids = [uuid1, uuid2, ...])
- Receives events from MULTIPLE specific domains
- Perfect for grouping related domains when webhook endpoint limits apply
- Example: Plan has 20 domains, 5 webhook limit → group marketing domains, support domains, etc.
Mixed Approach
- You can combine all three types
- Domain-specific/group webhooks fire first, then customer-level
- Maximize efficiency with limited webhook endpoints
Create customer-level webhook (all domains):
curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://your-app.com/webhooks/mailerlogic",
"events": ["email.delivered", "email.opened", "email.clicked", "email.bounced", "email.complained"],
"name": "Production Webhook",
"domain_ids": null,
"is_active": true
}'Create domain group webhook (multiple domains):
curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://marketing.example.com/webhook",
"events": ["email.opened", "email.clicked"],
"name": "Marketing Domains Group",
"domain_ids": [
"550e8400-e29b-41d4-a716-446655440001",
"550e8400-e29b-41d4-a716-446655440002",
"550e8400-e29b-41d4-a716-446655440003"
],
"is_active": true
}'Create single domain webhook:
curl -X POST https://api.mailerlogic.net/api/v1/customer/webhooks \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"url": "https://support.example.com/webhook",
"events": ["email.delivered", "email.bounced"],
"name": "Support Domain Only",
"domain_ids": ["550e8400-e29b-41d4-a716-446655440000"],
"is_active": true
}'All webhook events include:
event - Event type (e.g., "email.delivered", "email.opened")timestamp - ISO 8601 timestampemail_id - UUID of the email (except unsubscribe events)tag - Optional tag for filtering/grouping (if provided when sending)metadata - Optional custom metadata object (if provided when sending)
Events sent to your endpoint: