Skip to Content
Docs
Guides

Migrating to emitd

Step-by-step guides to migrate from SendGrid, Resend, AWS SES, Postmark, and Mailgun to emitd with zero downtime, identical webhook events, and lower infrastructure costs.

Migrating to emitd gives your engineering team sub-second edge latency on Cloudflare Workers, 1-click Domain Connect DNS setup, dedicated dual message streams (transactional vs. marketing), native AI agent tools (MCP), and transparent pricing without enterprise markups.

This guide provides drop-in code comparisons and a step-by-step zero-downtime cutover plan.


Why switch to emitd?

FeatureLegacy Providers (SendGrid, Mailgun)Newer Wrappers (Resend, Postmark)emitd
Edge API Latency200 ms – 500 ms (centralized US servers)150 ms – 300 ms< 45 ms (Cloudflare Workers edge network)
DNS ConfigurationManual copy/pasting 5–7 complex recordsManual copy/pasting1-Click Domain Connect (GoDaddy, IONOS, 1&1, Squarespace) + Cloudflare Auto-Publish
DKIM Method3 fragile CNAME delegationsCNAME tokensBYODKIM (single 2048-bit RSA TXT) or CNAME tokens
AI Agent SupportNoneNoneNative Model Context Protocol (MCP) server for Cursor, Claude Code, Windsurf
Dual Message StreamsExpensive sub-account add-onsSeparate productsBuilt-in (outbound vs broadcast on dedicated IP pools)
Pricing at 100k emails~$90 – $120 / month~$80 / month$35 / month ($0.35 / 1,000, or $0.28 with prepaid credits)

Step-by-step zero-downtime migration plan

1. Add and verify your domain in emitd

Before modifying any existing application code, add your sending domain in the emitd Console → Sending domains.

  • If your DNS is on GoDaddy, IONOS, 1&1, or Squarespace, click Connect with Domain Connect to automatically authorize the records in 1 click.
  • If your DNS is on Cloudflare, use Auto-Publish to merge the DNS records instantly.
  • For all other registrars, add the provided DKIM and custom Return-Path records.

Note: Adding emitd's DKIM (relay._domainkey) and Return-Path (mail.yourdomain.com) records will NOT disrupt your current provider's active email sending.

2. Export and import contacts & suppressions

  • Bounces & Unsubscribes: Export your suppression list from your previous provider and import it into emitd via the Bulk Suppressions API or console. This ensures you never accidentally re-mail someone who previously unsubscribed.
  • Audiences: Import your marketing contacts and metadata via Batch Upsert Contacts.

3. Update your API integration

Coming from Resend, you can switch without changing your code. Otherwise, swap your sending code using the side-by-side examples below.

4. Switch over traffic and webhooks

  1. Configure your endpoint in emitd Console → Webhooks to receive HMAC-signed delivery, bounce, and complaint events.
  2. Deploy your application code pointing to https://api.emitd.com/v1/email.
  3. Once verified, decommission the old provider and clean up legacy DNS records.

Switch from Resend without changing code

emitd serves Resend's send API at a compatibility URL, and the official Resend SDKs read their host from RESEND_BASE_URL. Once your domain is verified in emitd, change two environment variables and keep your code:

RESEND_API_KEY=esk_live_...                              # an emitd API key
RESEND_BASE_URL=https://api.emitd.com/compat/resend

resend.emails.send(), resend.batch.send() and resend.emails.get() then run through emitd, with your emitd keys, quotas, and guardrails. Idempotency keys work as usual.

What's supported: from, to, cc, bcc, reply_to, subject, html, text, tags, headers, attachments with base64 content (10 MB each) and content_id for inline images, template, and scheduled_at as an ISO 8601 date.

What isn't: these are refused with a clear error, so you find out on your first test send rather than from a missing email.

FieldInstead
More than one reply_toUse one address.
attachments with pathSend the file as base64 content.
scheduled_at in natural language, like "in 1 hour"Use an ISO 8601 date.
headers that set who it's from or where replies go, like Reply-ToUse from and reply_to.

resend.emails.get() returns the sender, first recipient, subject, date and last_event. We don't keep message bodies in a form we can return, so html and text come back empty, as do cc and bcc.

Managing domains, contacts, and broadcasts all use the emitd API. Resend's webhook format is different too, so update your handlers using the event table below.

If some emails in a batch are refused, the rest still send. The response lists what went in data and what didn't in errors, so check errors and retry only those.


Migration code examples

Migrating from Resend

Both Resend and emitd use clean, developer-first REST APIs. With emitd, you gain sub-second edge dispatch and dual message streams.

import { Emitd } from "@emitd/sdk";

const emitd = new Emitd({ apiKey: process.env.EMITD_API_KEY! });

const { message_id } = await emitd.email.send({
  from: "Acme <billing@acme.com>",
  to: ["customer@example.com"],
  subject: "Invoice #1042",
  html_body: "<h1>Thanks for your business</h1>",
  message_stream: "outbound", // keeps transactional reputation pristine
});

Migrating from SendGrid

SendGrid's verbose personalizations array and complex JSON structure can be replaced with a clean, flat payload:

// emitd: Clean, flat, typed payload
await fetch("https://api.emitd.com/v1/email", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.EMITD_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "hello@acme.com",
    to: ["alice@example.com"],
    subject: "Reset your password",
    html_body: "<p>Click here to reset your password...</p>",
    tags: { type: "auth" },
  }),
});

Migrating from AWS SES (Direct)

Managing raw AWS SES requires complex IAM policies, managing SNS topics, Lambda webhook handlers, manual DMARC/DKIM setups, and writing custom suppression filters.

With emitd, you get the raw reliability of AWS SES combined with:

  • Zero AWS IAM credentials in your application code.
  • Instant DNS automation via Domain Connect and Cloudflare.
  • Sub-second edge API on Cloudflare Workers.
  • Built-in tracking, webhooks, and suppression management.
// Simple HTTPS call from any edge worker or serverless function
const res = await fetch("https://api.emitd.com/v1/email", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.EMITD_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    from: "support@acme.com",
    to: ["user@example.com"],
    subject: "Security Alert",
    text_body: "A new login was detected from your account.",
  }),
});

Migrating from Postmark

Postmark divides sending into "Transactional" and "Broadcast" servers requiring different Server API tokens.

In emitd, a single API key manages all sends, and you switch streams with one field: message_stream: "outbound" vs message_stream: "broadcast".

Stream switching in emitd
{
  "from": "notifications@acme.com",
  "to": ["user@example.com"],
  "subject": "Weekly summary",
  "template_alias": "weekly-digest",
  "template_model": { "items_count": 5 },
  "message_stream": "broadcast"
}

Webhook event translation

If your application listens for delivery events, emitd's webhooks provide consistent JSON payloads signed with HMAC SHA-256 (emitd-signature header):

SendGrid EventResend EventPostmark Eventemitd Event
deliveredemail.deliveredDeliveryemail.delivered
bounceemail.bouncedBounceemail.bounced
spamreportemail.complainedSpamComplaintemail.complained
openemail.openedOpenemail.opened
clickemail.clickedClickemail.clicked

Learn how to verify webhook signatures in the Webhooks guide.

On this page