Guides

How to migrate from Resend, step by step

Move from Resend to OpenSend without a rewrite: look first, import the account, enroll your keys, change one address and move each domain when you are ready.

4 min read

In short

  • Nothing has to happen at once. A program moves when you change the address it calls, and a domain when its records are verified.
  • The code stays: the official Resend SDKs take another address.
  • Keys are enrolled, not copied, because Resend shows a key once.
  • One request imports domains, contacts, segments, topics, templates, draft broadcasts and webhooks.
  • Opens, clicks and the history of mail sent before the move stay at Resend.

Before you start

You need a workspace in OpenSend and, for the import, a Resend key with full access. You do not need a maintenance window: until you change the address a program calls, its mail goes on leaving from Resend.

Read what behaves differently first. It is a short list, and it is better met now than in production.

Step 1: look at what is there

Before anything is copied, imports.inspect reads the Resend account and counts what is in it. Each kind of thing comes back with a number and a note that says how it will arrive, or why it stays behind.

In the console this is under Settings, Import. Nothing changes on either side when you look.

Step 2: bring the account over

One request starts the import, and it runs in the background. Name what to bring, or leave that out to bring everything.

At Resend
Domains
In OpenSend
The same domains, waiting for their DNS records
At Resend
Suppression list
In OpenSend
The same addresses on the list here
At Resend
Segments
In OpenSend
Audiences with the same names
At Resend
Contacts
In OpenSend
The same people, once each, subscribed or not
At Resend
Contact properties
In OpenSend
The same properties, with their types and fallbacks
At Resend
Topics
In OpenSend
The same topics, and what each contact chose
At Resend
Templates
In OpenSend
The same templates, under the same alias
At Resend
Broadcasts
In OpenSend
The drafts. Sent ones stay at Resend
At Resend
Webhooks
In OpenSend
The same endpoints, with the signing secret they already check
At Resend
API keys
In OpenSend
Their names, so you know which to enroll
  • Nothing arrives in a state that sends. A broadcast comes as a draft, and no contact starts an automation.
  • The key you gave is sealed while the import runs and wiped when it ends.
  • It reads politely: a few requests a second, and it waits when Resend asks it to.
  • You can run it again. What is already here is left alone, what is new is added, and someone who unsubscribed at Resend since is unsubscribed here.

What each contact holds and what they chose for a topic take one request for each contact. For a large account those two parts take hours. Leave them out to finish sooner, and run the import again later for them.

Step 3: enroll your keys

Resend shows a key once, so the import brings only the names of your keys. Enroll each key your programs hold: it is checked with Resend, kept here as a hash, and works from then on.

  • A key that only sends at Resend only sends here. A key with full access can be narrowed.
  • An enrolled key still works at Resend until you delete it there.
  • In the console: API keys, the three dots, Enroll a Resend key.

Step 4: point your code here

This is the whole change in most programs. The official SDKs read the address from the environment, so the code is not touched:

Shell
RESEND_BASE_URL=https://api.opensend.sh/v1/resend
SDK
Node.js
Setting
RESEND_BASE_URL, or baseUrl
Ends in a slash
No
SDK
Python
Setting
RESEND_API_URL, or resend.api_url
Ends in a slash
No
SDK
Go, PHP, Ruby
Setting
RESEND_BASE_URL
Ends in a slash
Yes

Change one program first and watch its mail in the logs. The ids things had at Resend keep working in these calls: a template, a segment, a domain, a contact, a topic.

Step 5: move each domain

A domain is verified by records in its DNS, and those are different here. This is the one step nobody can take for you.

  1. Open the domain here and publish its records beside the ones you have. Mail goes on leaving from Resend meanwhile.
  2. Verify the domain. It turns verified when every record is found.
  3. Switch the address your programs use. From then on mail from that domain leaves from here.
  4. Take the old records out when you are sure.

The domains page explains every record.

Step 6: check your webhooks

An endpoint that came over is in the format it already verifies: the same headers, the same body and the same secret. It is only told about mail sent from here, so nothing arrives twice while both services send.

Send a test email to an address that bounces in the sandbox and watch your endpoint receive the event.

What stays behind

  • Automations and their events are counted when you look, and not brought over yet.
  • Sent broadcasts stay at Resend. Drafts come over as drafts.
  • Opens, clicks and the history of mail sent before the move stay at Resend.

The migration page and the docs have the same steps with every request written out.

More from the blog

Send your first email in a few minutes.

Create a key and send, or clone the repository and run it yourself.