Migrate from Resend
Move from Resend
to OpenEmail.
Point the Resend SDK at OpenEmail and keep your code, or convert it to the OpenEmail SDK. Audiences, contacts, templates and webhooks come across with one key.
The same email,
written both ways.
One message with a reply-to address and a tag, sent through Resend and then through OpenEmail.
import { Resend } from 'resend'const resend = new Resend(process.env.RESEND_API_KEY)const { data, error } = await resend.emails.send({from: 'Acme <[email protected]>',to: ['[email protected]'],replyTo: '[email protected]',subject: 'Your invoice is ready',html: '<p>Thanks for your order.</p>',tags: [{ name: 'category', value: 'invoice' }],})if (error) {console.error(error.message)} else {console.log(data.id)}
import { init, openemail } from '@openemail/sdk'init({ apiKey: process.env.OPENEMAIL_API_KEY })try {const email = await openemail.emails.send({from: 'Acme <[email protected]>',to: ['[email protected]'],replyTo: '[email protected]',subject: 'Your invoice is ready',html: '<p>Thanks for your order.</p>',tags: { category: 'invoice' },})console.log(email.id)} catch (error) {console.error(error.message)}
Field by field,
what goes where.
Each option Resend takes, and its place in OpenEmail.
| Resend | OpenEmail | Notes |
|---|---|---|
from, to, cc, bcc, subject, html, text | from, to, cc, bcc, subject, html, text | Same names and the same meaning. |
reply_to | replyTo | One address per message. |
tags: [{ name, value }] | tags: { name: value } | Up to 10 key and value pairs. |
react | html | Render the component to HTML first. |
attachments[].path | attachments[].content | Fetch the file and pass its bytes. |
scheduled_at | scheduledAt | A date, an ISO time or a duration. |
Idempotency-Key | idempotencyKey | Same meaning, 255 characters at most. |
batch.send | emails.sendBatch | Up to 100 emails, each sent on its own. |
contacts.create({ audienceId }) | contacts.create({ audienceIds }) | One name field, several audiences. |
Converter
Paste your Resend code,
get it back on OpenEmail.
Pick where the code comes from and its language. Recognised keys are removed in your browser, and nothing you paste is kept.
Coming from Resend?
Change two lines.
Point the Resend SDK at OpenEmail and keep your code, then bring contacts, templates and webhooks across.
Two differences: a message takes one reply-to address, and an inline image referenced by content id arrives as an ordinary attachment.
RESEND_BASE_URL=https://api.openemail.uk/compat/resendRESEND_API_KEY=oe_live_…Answered in Resend's own shapes and error names
Bring the rest with one key
- Suppressions
- Audiences
- Contacts
- Templates
- Webhooks
Bring the rest
with one key.
Paste a Resend key, check what is there and start the import. Data moves across, and domains and keys arrive as a checklist, so nothing is left behind.
Move from Resend
Move your setup over from Resend.
RESEND_BASE_URL=https://api.openemail.uk/compat/resendRESEND_API_KEY=oe_live_…Webhook events,
renamed.
Each Resend event and the OpenEmail event that replaces it. Every request carries one event, signed.
| Resend | OpenEmail |
|---|---|
email.sent | email.sent |
email.delivered | email.delivered |
email.delivery_delayed | email.delivery_delayed |
email.bounced | email.bounced |
email.complained | email.complained |
email.opened | email.opened |
email.clicked | email.clicked |
email.failed | email.failed |
Moving from Resend,
answered.
Moving from
somewhere else?
Every guide has the same converter, field map and checklist.
Converted?
Create the key it reads.
A workspace takes a minute. Add your domain, create an API key and set OPENEMAIL_API_KEY.