Switch from Resend in one line
Our SDK method tree is intentionally identical. Change the import and the API key — your send calls don't move. There's even a compat package that re-exports the client as Resend.
import { Resend } from 'resend';
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send({
from: 'You <hello@yourdomain.com>',
to: ['user@example.com'],
subject: 'Hello world',
html: '<p>Hi.</p>',
});The body of every call is identical. Only the import and the client constructor change.
What actually changes
Four lines move. The method names you call every day do not.
import { Resend } from 'resend'import { MacroMail } from '@macromail/sdk'new Resend(key)new MacroMail(key)api.resend.comapi.macromail.devre_…mm_…client.emails.send(…)client.emails.send(…)client.batch.send(…)client.batch.send(…)client.domains.create(…)client.domains.create(…)Zero-diff with @macromail/compat
Don't want to touch a single call site? Install the compat package. It re-exports MacroMail under the name Resend and accepts both re_ and mm_ key prefixes — so the only line that changes is the import.
// one-line change — keep every call site
import { Resend } from '@macromail/compat';
// accepts re_… or mm_… keys
const resend = new Resend(process.env.RESEND_API_KEY);
await resend.emails.send({
from: 'You <hello@yourdomain.com>',
to: ['user@example.com'],
subject: 'Hello world',
html: '<p>Hi.</p>',
});How to migrate
Most teams finish in a coffee break. Your agent can do it from this page.
Install the SDK and create a key
Run npm install @macromail/sdk, then create an mm_ key in the dashboard (or have your agent mint one over MCP). Add it to your env as MACROMAIL_API_KEY.
Swap the import and the client
Replace the resend import with @macromail/sdk and new Resend(...) with new MacroMail(...). Every send / batch / domains call stays byte-for-byte the same.
Verify your domain and send
Add your sending domain, drop in the SPF/DKIM/DMARC records we generate, and send. Your existing call sites don't change — only the import and the key did.
Swap the import. Keep the code.
Create a free account, mint an mm_ key, and send your first email on the same call sites you already have.