Sign inGet started

Migration von Resend

Diese Seite ordnet Resends POST /emails-Payload, Suppression-Handling und Svix-signierte Webhooks Bird zu. Folgen Sie der Hauptmigrationsanleitung der Reihe nach und verwenden Sie diese Zuordnungen für die Schritte 1, 3 und 4. Die Send-Payloads haben ähnliche Felder, aber Tracking, Metadaten und Webhook-Verifizierung erfordern Änderungen.

Übergeben Sie dies Ihrem Agenten

Fügen Sie dies in Claude Code, Cursor oder Codex ein. Der Agent arbeitet diese Seite gegen Ihr eigenes Repository ab und nutzt die Bird-Oberfläche, die er bereits hat: den MCP-Server, falls einer verbunden ist, oder die CLI, falls sie installiert und angemeldet ist.
Codebeispiel
I am moving an email integration from Resend to Bird. Route through it with me.
1. Check what you already have before setting anything up. If Bird's MCP server is connected, use its tools. If the Bird CLI is installed and signed in, use that. Either one is enough, and every step below is an action you take with whichever you have. Only if neither is present, follow https://bird.com/docs/ai/set-up-your-agent.md to set one up and sign me in. Every Bird docs page serves Markdown at its own URL with `.md` appended, so fetch that rather than the HTML.
2. Read https://bird.com/docs/guides/email/migrate/resend.md for the payload, suppression and event mapping, and https://bird.com/docs/guides/email/migrate.md for the order the steps go in.
3. Find and list my Resend usage in this repository before you change anything: the POST /emails and batch call sites and any SDK wrappers around them, the webhook handler and the URL it is registered at, and every domain I send from.
4. Register each of those sending domains with Bird and give me the DNS records to publish, following https://bird.com/docs/guides/email/sending-domains.md. Leave every DNS record my current provider uses exactly as it is: Bird's records are published alongside them and both providers authenticate side by side until I switch traffic. Publishing DNS affects mail for the whole domain, so show me the records and let me publish them.
5. Rebuild my suppression list and import it into Bird before any production traffic goes through Bird, so my first sends do not reach addresses that already bounced or complained. Resend publishes no suppression export, so there is no endpoint that returns this list: derive it from whatever bounce and complaint events I have stored from my webhook, from the dashboard's Emails view, and from contacts marked unsubscribed in any Audience I use. That means the list can be incomplete without either of us noticing, so show me the list you built and tell me which of those sources each address came from before you import anything. The Bird import takes one address per request and is idempotent, so a partial re-run is safe. https://bird.com/docs/guides/email/suppressions.md has the reason taxonomy.
6. Port the send call and the webhook handler using the mapping tables on the provider page. Verification is a header change rather than a rewrite here: Resend signs with Svix and Bird signs per Standard Webhooks, which is the same HMAC construction with the svix-* headers renamed to webhook-*, so keep my verifier and rename what it reads. The event shape does change: Resend's events are scoped to a message and Bird's are scoped to a recipient, so a send to three recipients yields three outcomes rather than one. See https://bird.com/docs/guides/webhooks.md and https://bird.com/docs/guides/email/events.md.
7. Run my whole integration against Bird's mail sandbox before any production traffic, following https://bird.com/docs/guides/email/testing-sandbox.md. Sandbox sends run the real pipeline without reaching an inbox or touching my sending reputation.
8. Stop and ask me wherever a step needs a decision. Do not point production traffic at Bird until I have seen the sandbox results and replied with the words cut over to Bird. Retiring the Resend path is a separate step that comes later: ask me again and wait for me to reply with the words retire the Resend path. A reply that agrees without naming what it is authorising is not authorisation. Finish by telling me what is left that only a person can do.

Send-Aufruf zuordnen

FunktionResendBird
Absenderfromfrom
Empfängerto / cc / bccto / cc / bcc (Arrays)
Betreffsubjectsubject
Inhalthtml / texthtml / text (mindestens eins)
Reply-toreply_toreply_to (Array)
Eigene Headerheadersheaders (String-→-String-Objekt)
Filterbare Labelstags: {name, value}-Paaretags: {name, value}-Paare
Round-Trip-Kontext(keiner; Tags dienen auch als Kontext)metadata: beliebiger JSON
Zeitplanungscheduled_atscheduled_at
Öffnungs-/Klick-TrackingDashboard-Einstellung pro Domaintrack_opens / track_clicks (Standard true)
Kategorie(keine)category: marketing (Standard) oder transactional
Unsere Feldlimits und Standardwerte (Empfängeranzahl, Tag- und Metadaten-Limits) finden Sie unter E-Mail senden.
Portierungshinweise:
  • Tags behalten ihre Struktur, und metadata ist ein Upgrade. Resend-Tags sind dieselben {name, value}-Paare, die wir verwenden, aber deren Werteinschränkungen drängten Korrelationsdaten in Tag-Werte. Verschieben Sie Korrelationskontext hier nach metadata (beliebiger JSON, bei jedem Webhook-Event zurückgegeben und bei API-Lesezugriffen enthalten) und behalten Sie Tags zum Filtern. Siehe Tags vs. Metadaten.
  • Tracking wandert in den Payload. Resend schaltet Öffnungs-/Klick-Tracking pro Domain im Dashboard um. Wir setzen track_opens/track_clicks pro Nachricht (beide standardmäßig true).
  • scheduled_at wird direkt übernommen, Name und alles. Siehe Geplantes Senden. Für react rendern Sie Ihre React-Email-Templates in Ihrer Anwendung zu HTML (die render-Funktion aus @react-email/render funktioniert unverändert) und senden das Ergebnis als html.
  • Anhänge werden direkt portiert. Resends attachments (Base64 content) werden unserem Attachments-Array zugeordnet. Setzen Sie content_id für Inline-Bilder.
  • Batch-Versand wird direkt portiert. Resends POST /emails/batch wird zu unserem Batch-Endpoint, mit Einzelergebnissen pro Eintrag in beiden Fällen.

Suppressions exportieren

Resend bietet keinen dedizierten Suppression-Listen-Export. Rufen Sie Adressen ab, deren letztes Event bounced oder complained ist. Nutzen Sie die Emails-Ansicht im Dashboard oder Ihre gespeicherten Webhook-Events und durchlaufen Sie die Liste mit der Import-Schleife. Wenn Sie Audiences für Marketing-Mails verwenden, übernehmen Sie auch als abgemeldet markierte Kontakte.

Webhook-Events übersetzen

ErgebnisResendBird
Angenommen/verarbeitetemail.sentemail.acceptedemail.processed
Zugestelltemail.deliveredemail.delivered
Temporärer Fehleremail.delivery_delayedemail.deferred
Permanenter Bounceemail.bouncedemail.bounced / email.out_of_band_bounce
Spam-Beschwerdeemail.complainedemail.complained
Blockiert/unterdrücktemail.failedemail.rejected
Öffnungemail.openedemail.opened
Klickemail.clickedemail.clicked
Abmeldung(keine)email.unsubscribed / email.list_unsubscribed
Die Webhook-Verifizierung verwendet eine verwandte HMAC-Konstruktion, aber andere Header. Resend nutzt svix-id, svix-timestamp und svix-signature. Bird folgt der Standard-Webhooks-Spezifikation mit webhook-*-Headern. Aktualisieren Sie Ihren Verifier, um das Signing Secret von Bird und die Anleitung unter Webhooks und Events zu verwenden.
Ein Verhaltensunterschied: Resends Events beziehen sich auf die Nachricht. Unsere Zustellungs-Events beziehen sich auf den Empfänger (recipient_id neben email_id), sodass ein Versand an drei Empfänger drei Zustellungsergebnisse erzeugt, eins pro Empfänger.

Umstellung

Arbeiten Sie Domains & DNS und den Sandbox-Smoke-Test in der Hauptanleitung durch. Beides ist anbieterunabhängig.

Nächste Schritte

  • Sende-Domains: Registrierung, Verifizierungslebenszyklus und die DNS-Einträge, die Sie umleiten
  • Webhooks & Events: Endpoint-Einrichtung und Standard-Webhooks-Verifizierung
  • Test-Sandbox: Smoke-Test der neuen Integration vor der Umstellung
  • Suppressions: Bestätigen Sie Ihre importierte Liste und wie wir sie ab hier pflegen