Moving from Resend
What changes when you move an integration from Resend to the Reggio Digital email API, and the order to do it in.
If your software already sends through Resend, this is what has to change to point it at us instead. In most projects it is the address you post to and a handful of field shapes.
Read this first
- We are not a drop-in replacement. The Resend libraries post to Resend's own address and shape several fields differently, so swapping the key is not enough. Take the library out and call us over plain HTTP. The transactional email API has worked examples in cURL, PHP, Laravel and Node.
- The ideas carry across. You still post a message, get an id back, and look that id up to see what happened.
- Nothing has to be switched off to start. Both providers can be set up on the same domain at once, so you can move one kind of message and leave the rest where it is.
What changes in your code
| Part | With Resend | With us |
|---|---|---|
| Where you post | api.resend.com/emails |
https://reggiodigital.com/api/v1/emails |
| Your key | Authorization: Bearer with a Resend key |
The same header with a Reggio key from Connected apps. |
| A name on the sender | Acme <hello@yourdomain.com> works. |
Send the address on its own. A name in front is refused with a 422. |
| One recipient | A string or a list. | Always a list. |
| Tags | A list of {name, value} entries. |
One object of name and value pairs: {"kind": "receipt"}. Names use letters, numbers, dashes, underscores, colons and dots. |
| A batch | The list of messages is the whole body. | The list goes under emails, up to 100. One bad message rejects the whole batch. |
| A send that worked | 200 |
202. Code that checks for exactly 200 needs changing. |
| Cancelling a scheduled message | POST to a cancel address. |
DELETE /emails/{id}. |
| Moving a scheduled message | Supported. | PATCH /emails/{id} with a new scheduled_at, up to 30 days out. It keeps its id. |
| Errors | A message and a name at the top level. | Always {"error": {"type", "message"}}, with fields when a field is the problem. See errors. |
| The id you get back | One consistent shape. | A message sent now and a message held for later have different shapes. Store whatever you are given. |
| Looking a message up | Returns the message, content included. | Returns what happened to it: status, times and a plain explanation of any bounce. Kept 30 days. |
| Blocked addresses | Handled on their side. | We skip an address we have stopped sending to and return it in suppressed. That is not an error. |
| Rate limit | A few requests a second. | 120 requests a minute per account. Every send also returns what is left of the monthly allowance. |
| Libraries | Official SDKs. | None yet. Plain HTTP is the supported way in. |
The order to do it in
Nothing here needs a maintenance window, and every step is reversible until the last.
- Verify your domain with us. Add it under Sending domains and put the records it gives you in your DNS. Resend's records stay where they are. Two providers signing mail for one domain is normal. If the domain already has an SPF record, merge ours into it rather than adding a second.
- Get a key. Connect your application under Connected apps. Put the key in your environment beside the Resend one, not over it, so going back is a one line change.
- Change the code. Work down the table above.
- Test without emailing anyone. Send to the test addresses. They produce a real delivery, bounce and spam complaint on demand, and nothing reaches a real inbox. Check your bounce handling against them, and confirm each one on the account's Sent page.
- Bring your blocked addresses across. Export the addresses Resend has stopped sending to and open a ticket with the file. We load them before you move real traffic. This is the step that matters most: an address that bounced or complained on Resend starts fresh on our side, and mailing it again costs you reputation you already paid for.
- Move one kind of message first. Something low volume that you would notice going wrong, such as password resets. Watch the Sent page for a few days.
- Move the rest, then stop. Keep the Resend key working for a week or two after the last message. Once you are sure, close the Resend account and remove its DNS records last. Removing them while anything still sends through Resend bounces that mail.
If you would rather we did it
We do this work. Open a ticket and we will change the code, test it against the test addresses, and move the traffic across with you watching. If the site is WordPress there is usually no code at all: we connect the site to send through us directly.