Migreren vanaf Resend
Deze pagina vertaalt de POST /emails-payload, onderdrukkingsafhandeling en Svix-ondertekende webhooks van Resend naar Bird. Volg de hoofdmigratiegids op volgorde en gebruik deze vertalingen voor stap 1, 3 en 4. De send-payloads hebben vergelijkbare velden, maar tracking, metadata en webhookverificatie vereisen aanpassingen.
Geef dit aan je agent
Plak dit in Claude Code, Cursor of Codex. De agent werkt deze pagina door tegen je eigen repository, met het Bird-oppervlak dat hij al heeft: de MCP-server als die is verbonden, de CLI als die is geïnstalleerd en ingelogd.
Codevoorbeeld
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.Vertaal de send-aanroep
| Functie | Resend | Bird |
|---|---|---|
| Afzender | from | from |
| Ontvangers | to / cc / bcc | to / cc / bcc (arrays) |
| Onderwerp | subject | subject |
| Body | html / text | html / text (minstens één) |
| Reply-to | reply_to | reply_to (array) |
| Aangepaste headers | headers | headers (string → string object) |
| Filterbare labels | tags: {name, value}-paren | tags: {name, value}-paren |
| Round-tripcontext | (geen; tags dienen ook als context) | metadata: willekeurige JSON |
| Planning | scheduled_at | scheduled_at |
| Open-/kliktracking | dashboardinstelling per domein | track_opens / track_clicks (standaard true) |
| Categorie | (geen) | category: marketing (standaard) of transactional |
Onze veldlimieten en standaardwaarden (aantallen ontvangers, tag- en metadatalimieten) staan in E-mail verzenden.
Opmerkingen bij het overzetten:
- Tags behouden hun structuur, en metadata is een upgrade. Tags van Resend zijn dezelfde {name, value}-paren die wij gebruiken, maar hun waardebeperkingen duwden correlatiegegevens in tagwaarden. Verplaats hier correlatiecontext naar metadata (willekeurige JSON, teruggegeven bij elk webhook-event en beschikbaar bij API-reads) en houd tags voor filtering. Zie tags vs metadata.
- Tracking verhuist naar de payload. Resend schakelt open-/kliktracking per domein in het dashboard. Wij stellen track_opens/track_clicks per bericht in (beide standaard true).
- scheduled_at is direct over te nemen, naam en al. Zie gepland verzenden. Render voor react je React Email-templates naar HTML in je applicatie (de render-functie uit @react-email/render werkt ongewijzigd) en verzend het resultaat als html.
- Bijlagen zijn direct over te nemen. De attachments van Resend (base64 content) komen overeen met onze attachments-array. Stel content_id in voor inline-afbeeldingen.
- Batchverzending is direct over te nemen. De POST /emails/batch van Resend wordt ons batch-endpoint, met per-entry resultaten in beide gevallen.
Suppressies exporteren
Resend biedt geen aparte export van de suppressielijst. Haal adressen op waarvan het laatste event bounced of complained is. Gebruik de Emails-weergave in het dashboard of je opgeslagen webhook-events en voer de lijst door de importloop. Als je Audiences gebruikt voor marketingmail, neem dan ook contacten mee die als uitgeschreven zijn gemarkeerd.
Webhook-events vertalen
| Resultaat | Resend | Bird |
|---|---|---|
| Geaccepteerd/verwerkt | email.sent | email.accepted → email.processed |
| Afgeleverd | email.delivered | email.delivered |
| Tijdelijke fout | email.delivery_delayed | email.deferred |
| Permanente bounce | email.bounced | email.bounced / email.out_of_band_bounce |
| Spamklacht | email.complained | email.complained |
| Geblokkeerd/onderdrukt | email.failed | email.rejected |
| Open | email.opened | email.opened |
| Klik | email.clicked | email.clicked |
| Uitschrijving | (geen) | email.unsubscribed / email.list_unsubscribed |
Webhookverificatie gebruikt een verwante HMAC-constructie maar andere headers. Resend gebruikt svix-id, svix-timestamp en svix-signature. Bird volgt de Standard Webhooks-specificatie met webhook-*-headers. Pas je verifier aan om het signing secret van Bird en de Webhooks en events-procedure te gebruiken.
Eén gedragsverschil: events van Resend zijn berichtgebonden. Onze afleverevents zijn ontvanger-gebonden (recipient_id naast email_id), dus een verzending naar drie ontvangers levert drie afleverresultaten op, één per ontvanger.
Overschakelen
Doorloop domeinen & DNS en de sandbox-rooktest in de hoofdgids. Beide zijn provideronafhankelijk.
Volgende stappen
- Verzenddomeinen: registratie, verificatielevenscyclus en de DNS-records die je omzet
- Webhooks & events: endpoint-configuratie en Standard Webhooks-verificatie
- Testsandbox: test de nieuwe integratie voordat je overschakelt
- Suppressies: controleer je geïmporteerde lijst en hoe wij die vanaf hier onderhouden
Gerelateerde bronnen
Ga verder met de documentatie, gidsen en voorbeelden voor dit onderwerp. De bronnen zijn in het Engels.
Bekijk de gidsGetting started with emailOntdek de mogelijkheidEmailVolg het leerpadBuild your first integrationImplementatiegidsSend your first email
Probeer de oefening en ontvang een implementatieoverzicht