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

MailgunNotify
Recommended clientmailgun.js (mg.messages.create)One fetch — no SDK required
AuthHTTP Basic (api + API key)x-api-key header
EndpointPOST /v3/{domain}/messages on api.mailgun.net or api.eu.mailgun.netPOST https://notify.cx/api/email/send
Bodyto, subject, html / text (form or JSON)to, subject, message
ObservabilityEvents / webhooks in MailgunLogs + webhooks on Pro/Scale

Before / after

Mailgun (official mailgun.js SDK)

import formData from 'form-data';
import Mailgun from 'mailgun.js';

const mailgun = new Mailgun(formData);
const mg = mailgun.client({
  username: 'api',
  key: process.env.MAILGUN_API_KEY
});

await mg.messages.create('acme.com', {
  from: 'Acme <noreply@acme.com>',
  to: ['user@example.com'],
  subject: 'Welcome',
  html: '<h1>Welcome</h1>'
});

Notify (one fetch — no SDK required)

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

  1. Sign up and copy an API key
  2. Verify your domain
  3. Map html / textmessage
  4. Recreate webhooks against Notify’s payload (docs)
  5. Confirm delivery in logs
  6. Turn down Mailgun sending for those flows

Where to next?