Migrate from Mailgun to Notify
Move transactional sends from Mailgun to Notify — auth, endpoint, and payload mapping.
Mailgun is a broad email platform. If you only need transactional send + observe, Notify is a smaller surface: one send endpoint, flat pricing, logs and webhooks.
What changes
| | Mailgun | Notify |
| --- | --- | --- |
| Auth | Basic auth or API key variants | x-api-key header |
| Endpoint | Regional Messages API | POST https://notify.cx/api/email/send |
| Body | to, subject, html / text (form or JSON) | to, subject, message |
| Observability | Events / webhooks in Mailgun | Logs + webhooks on Pro/Scale |
Before / after
Mailgun (conceptual JSON)
await fetch('https://api.mailgun.net/v3/YOUR_DOMAIN/messages', {
method: 'POST',
headers: {
Authorization: 'Basic ' + Buffer.from('api:' + process.env.MAILGUN_API_KEY).toString('base64')
},
body: new URLSearchParams({
from: 'Acme <noreply@acme.com>',
to: 'user@example.com',
subject: 'Welcome',
html: '<h1>Welcome</h1>'
})
});
Notify
await fetch('https://notify.cx/api/email/send', {
method: 'POST',
headers: {
'x-api-key': process.env.NOTIFY_API_KEY!,
'Content-Type': 'application/json'
},
body: JSON.stringify({
from: 'Acme <noreply@acme.com>',
to: 'user@example.com',
subject: 'Welcome',
message: '<h1>Welcome</h1>'
})
});
Migration checklist
- Sign up and copy an API key
- Verify your domain
- Map
html/text→message - Recreate webhooks against Notify’s payload (docs)
- Confirm delivery in logs
- Turn down Mailgun sending for those flows