Migrate

Migrate from Resend to AgenticEmail

Resend has excellent developer experience for sending. If your agents now need to receive and reply - not just send - and you want a real inbox per agent instead of sending from a shared domain, this guide maps the move.

AgenticEmail keeps the ergonomics you like: a clean, type-safe SDK and a one-line send. The difference is the primitive. You send from an inbox you create at runtime, that same inbox receives parsed inbound mail, and you get a hosted MCP server plus opt-in end-to-end encryption on top.

How the API maps

ConceptResendAgenticEmail
Installnpm install resendnpm install agenticemail
Authenticatenew Resend(RESEND_API_KEY)new AgenticEmail({ apiKey: AGENTICEMAIL_API_KEY })
Sender identityA verified domain used as the `from` address; there is no per-agent inbox primitive.An inbox you create with client.inboxes.create(); it both sends and receives at a real address.
Send a messageresend.emails.send({ from, to, subject, html })client.messages.send({ inboxId, to, subject, html })
Batch sendresend.batch.send([ ... ])Batch and scheduled sending are first-class on the same inboxes.
Receive inboundInbound webhooks parse mail for a configured domain to your endpoint.Per-inbox parsed JSON via messages.list, a signed webhook, or the WebSocket stream.
Agent featuresGeneral-purpose email API; not agent-specific.Hosted MCP server, per-inbox system prompts, and AI reply drafts.
End-to-end encryptionNot offered - the platform can read message content.Opt-in end-to-end encryption for agent-to-agent mail; keys stay on your side.

Sending an email

Before - Resend
import { Resend } from "resend";

const resend = new Resend(process.env.RESEND_API_KEY);

await resend.emails.send({
  from: "support@yourdomain.com",
  to: "customer@example.com",
  subject: "Thanks for reaching out",
  html: "<p>Hi there - an agent will follow up shortly.</p>",
});
After - AgenticEmail
import { AgenticEmail } from "agenticemail";

const client = new AgenticEmail({ apiKey: process.env.AGENTICEMAIL_API_KEY });

// Create the inbox once, then reuse inbox.id (it also receives replies).
const inbox = await client.inboxes.create({ username: "support" });

await client.messages.send({
  inboxId: inbox.id,
  to: "customer@example.com",
  subject: "Thanks for reaching out",
  html: "<p>Hi there - an agent will follow up shortly.</p>",
});

Receiving replies

Before - Resend inbound webhook
// Resend posts inbound events for a configured domain.
app.post("/inbound", (req, res) => {
  const { from, subject, text } = req.body.data;
  res.sendStatus(200);
});
After - AgenticEmail
// Each inbox is a real address; inbound arrives as parsed JSON.
const { messages } = await client.messages.list({ inboxId: inbox.id });

for (const m of messages) {
  console.log(m.from, m.subject, m.text); // no MIME parsing required
}

// Or push instead of poll: register a signed webhook, or open the
// WebSocket stream at /v1/events for message.received events.

Migration steps

  1. 1

    Install the SDK and set your key

    npm install agenticemail and set AGENTICEMAIL_API_KEY from the dashboard. Scope the key to specific inboxes for least-privilege per agent.

  2. 2

    Create an inbox instead of a from address

    Where Resend sent from a verified domain, create an inbox with client.inboxes.create(). Omit the domain to use the shared sending domain, or add your own domain first.

  3. 3

    Swap the send call

    Replace resend.emails.send(...) with client.messages.send({ inboxId, ... }). The to, subject, html, text, and attachment fields map directly, and batch sends carry over.

  4. 4

    Add inbound and real-time

    Point a per-inbox webhook or the WebSocket stream at your handler, or poll client.messages.list(). Inbound is parsed JSON, scoped to the specific inbox.

  5. 5

    Move your domain and cut over

    Add your domain; SPF, DKIM, and DMARC are generated and verified. Run traffic through both providers, compare, then flip fully.

What is different

  • Resend is outbound-first. You are gaining a two-way inbox per agent, so restructure sends from a domain into sends from an inbox that also receives.
  • Keep your React Email templates - render them to HTML and pass the result as `html`. AgenticEmail does not host templates for you.
  • Resend's DX is a real strength; AgenticEmail matches the one-line send and type-safe SDK, and adds receiving, MCP, and end-to-end encryption on top.
  • Cut over gradually: send through both providers, compare deliverability, then complete the switch.

Ready to try it? Run the quickstart - create an inbox, send a message, and receive it back as JSON in about five minutes, free. Prefer a side-by-side view? See the full Resend comparison.

Frequently asked questions

Is migrating from Resend hard?
No. The send call is nearly identical, and the SDK ergonomics are similar. The one change is sending from an inbox you create instead of a verified domain `from` - which is what gives you inbound replies, MCP, and end-to-end encryption.
Can I keep my domain and templates?
Yes to both. Add your domain and SPF, DKIM, and DMARC are generated and verified for you. Keep rendering your templates (React Email or otherwise) and pass the HTML to messages.send().
What do I gain over Resend?
A real, addressable inbox per agent that receives as well as sends, per-inbox webhooks and a WebSocket stream, a hosted MCP server so agents use email as a tool, and opt-in end-to-end encryption for agent-to-agent mail.
Can AgenticEmail still send transactional email like Resend?
Yes - transactional and conversational email with threading, attachments, and batch and scheduled sends. The same inboxes also receive and reply, which an outbound-only API does not.
Talk to a real person