Migrasi dari Resend
Halaman ini memetakan payload POST /emails Resend, penanganan supresi, dan webhook bertanda tangan Svix ke Bird. Ikuti panduan migrasi utama secara berurutan, dan gunakan pemetaan ini untuk langkah 1, 3, dan 4. Payload pengiriman memiliki field yang serupa, tetapi pelacakan, metadata, dan verifikasi webhook memerlukan perubahan.
Serahkan ini ke agen Anda
Tempelkan ini ke Claude Code, Cursor, atau Codex. Agen akan mengerjakan halaman ini terhadap repositori Anda, menggunakan permukaan Bird mana pun yang sudah tersedia: server MCP jika sudah terhubung, atau CLI jika sudah terinstal dan sudah login.
Contoh kode
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.Petakan panggilan pengiriman
| Fungsi | Resend | Bird |
|---|---|---|
| Pengirim | from | from |
| Penerima | to / cc / bcc | to / cc / bcc (array) |
| Subjek | subject | subject |
| Isi | html / text | html / text (minimal satu) |
| Reply-to | reply_to | reply_to (array) |
| Header kustom | headers | headers (objek string → string) |
| Label yang dapat difilter | tags: pasangan {name, value} | tags: pasangan {name, value} |
| Konteks bolak-balik | (tidak ada; tag berfungsi ganda sebagai konteks) | metadata: JSON arbitrer |
| Penjadwalan | scheduled_at | scheduled_at |
| Pelacakan buka/klik | pengaturan dashboard per domain | track_opens / track_clicks (default true) |
| Kategori | (tidak ada) | category: marketing (default) atau transactional |
Batas field dan nilai default kami (jumlah penerima, batas tag dan metadata) tercantum di Mengirim email.
Catatan porting:
- Tag mempertahankan bentuknya, dan metadata adalah peningkatan. Tag Resend adalah pasangan {name, value} yang sama dengan yang kami gunakan, tetapi batasan nilainya mendorong data korelasi ke dalam nilai tag. Di sini, pindahkan konteks korelasi ke metadata (JSON arbitrer, dikembalikan di setiap event webhook dan tersedia saat membaca API) dan gunakan tag hanya untuk pemfilteran. Lihat tag vs metadata.
- Pelacakan berpindah ke dalam payload. Resend mengatur pelacakan buka/klik per domain di dashboard. Kami mengatur track_opens/track_clicks per pesan (keduanya default true).
- scheduled_at dipetakan langsung, nama dan semuanya. Lihat pengiriman terjadwal. Untuk react, render template React Email Anda ke HTML di aplikasi Anda (fungsi render dari @react-email/render berfungsi tanpa perubahan) dan kirim hasilnya sebagai html.
- Lampiran dapat dipindahkan langsung. attachments Resend (content base64) dipetakan ke array lampiran kami. Atur content_id untuk gambar inline.
- Pengiriman batch dapat dipindahkan langsung. POST /emails/batch Resend menjadi endpoint batch kami, dengan hasil per entri di kedua kasus.
Ekspor supresi
Resend tidak menyediakan ekspor daftar supresi khusus. Tarik alamat yang event terakhirnya adalah bounced atau complained. Gunakan tampilan Emails di dashboard atau event webhook yang Anda simpan, lalu jalankan daftar tersebut melalui loop impor. Jika Anda menggunakan Audiences untuk email pemasaran, pindahkan juga kontak yang ditandai berhenti berlangganan.
Terjemahkan event webhook
| Hasil | Resend | Bird |
|---|---|---|
| Diterima/diproses | email.sent | email.accepted → email.processed |
| Terkirim | email.delivered | email.delivered |
| Kegagalan sementara | email.delivery_delayed | email.deferred |
| Bounce permanen | email.bounced | email.bounced / email.out_of_band_bounce |
| Keluhan spam | email.complained | email.complained |
| Diblokir/disuppresi | email.failed | email.rejected |
| Dibuka | email.opened | email.opened |
| Diklik | email.clicked | email.clicked |
| Berhenti berlangganan | (tidak ada) | email.unsubscribed / email.list_unsubscribed |
Verifikasi webhook menggunakan konstruksi HMAC yang serupa tetapi header yang berbeda. Resend menggunakan svix-id, svix-timestamp, dan svix-signature. Bird mengikuti spesifikasi Standard Webhooks dengan header webhook-*. Perbarui verifier Anda untuk menggunakan signing secret Bird dan prosedur Webhook dan event.
Satu perbedaan perilaku: event Resend bercakupan per pesan. Event pengiriman kami bercakupan per penerima (recipient_id bersama email_id), sehingga pengiriman ke tiga penerima menghasilkan tiga hasil pengiriman, satu per penerima.
Cutover
Selesaikan domain & DNS dan uji coba sandbox di panduan utama. Keduanya tidak bergantung pada provider.
Langkah selanjutnya
- Domain pengiriman: pendaftaran, siklus hidup verifikasi, dan rekaman DNS yang Anda arahkan ulang
- Webhook & event: pengaturan endpoint dan verifikasi Standard Webhooks
- Sandbox pengujian: uji coba integrasi baru sebelum cutover
- Supresi: konfirmasi daftar yang diimpor dan cara kami memeliharanya selanjutnya
Sumber daya terkait
Lanjutkan dengan dokumentasi, panduan, dan contoh untuk topik ini. Sumber daya tersedia dalam bahasa Inggris.
Tonton panduannyaGetting started with emailJelajahi kemampuannyaEmailIkuti jalur pembelajaranBuild your first integrationPanduan implementasiSend your first email
Coba praktiknya dan dapatkan ringkasan implementasi