Sign inGet started

SendGrid से माइग्रेट करें

यह पेज SendGrid के v3 Mail Send पेलोड, suppression सूचियों, और Event Webhook को Bird पर मैप करता है। मुख्य माइग्रेशन गाइड को क्रम से फ़ॉलो करें, और इन मैपिंग्स का उपयोग स्टेप 1, 3, और 4 के लिए करें।

यह अपने एजेंट को दें

इसे Claude Code, Cursor, या Codex में पेस्ट करें। एजेंट इस पेज को आपकी अपनी रिपॉज़िटरी पर चलाता है, जो भी Bird सरफ़ेस उसके पास पहले से है उसका उपयोग करता है: MCP सर्वर अगर कनेक्ट है, या CLI अगर इंस्टॉल और साइन इन है।
कोड उदाहरण
I am moving an email integration from SendGrid 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/sendgrid.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 SendGrid usage in this repository before you change anything: the /v3/mail/send call sites and any SDK wrappers around them, the Event 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. Export my suppressions from SendGrid and import them into Bird before any production traffic goes through Bird, so my first sends do not reach addresses that already bounced or complained. SendGrid splits these across GET /v3/suppression/bounces, GET /v3/suppression/spam_reports, GET /v3/suppression/unsubscribes, and GET /v3/asm/groups/{group_id}/suppressions for each unsubscribe group worth carrying over. 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. Bird signs deliveries per Standard Webhooks rather than SendGrid's scheme, so treat verification as a rewrite rather than a URL change: 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 SendGrid path is a separate step that comes later: ask me again and wait for me to reply with the words retire the SendGrid 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 कॉल को मैप करें

SendGrid का POST /v3/mail/send प्राप्तकर्ताओं को एक personalizations array में रैप करता है। हमारा POST /v1/email/messages एक फ़्लैट पेलोड है, इसलिए हर personalization अपना अलग send बनता है (या एक batch entry)।
क्या करता हैSendGridBird
प्रेषकfrom.emailfrom
प्राप्तकर्ताpersonalizations[].to / cc / bccto / cc / bcc (arrays)
विषयsubjectsubject
बॉडीcontent[] (type + value)html / text (कम से कम एक)
Reply-toreply_to / reply_to_listreply_to (array)
कस्टम हेडरheadersheaders (string → string object)
फ़िल्टर करने योग्य लेबलcategoriestags: {name, value} जोड़ियाँ
राउंड-ट्रिप कॉन्टेक्स्टcustom_argsmetadata: मनमाना JSON
स्टोर्ड टेम्प्लेटtemplate_id + dynamic_template_datatemplate + template.parameters
शेड्यूलिंगsend_atscheduled_at
ओपन/क्लिक ट्रैकिंगtracking_settingstrack_opens / track_clicks (डिफ़ॉल्ट true)
IP पूलip_pool_nameip_pool_id (ipp_... या ipp_shared)
कैटेगरी(कोई नहीं)category: marketing (डिफ़ॉल्ट) या transactional
हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट (प्राप्तकर्ता संख्या, टैग और मेटाडेटा सीमाएँ) ईमेल भेजना में हैं।
पोर्टिंग नोट्स:
  • categories सादे स्ट्रिंग होते हैं। हमारे टैग जोड़ियाँ हैं। "welcome" जैसी कैटेगरी {"name": "category", "value": "welcome"} बन जाती है। एक स्थिर name चुनें ताकि आपके डैशबोर्ड वैसे ही फ़िल्टर करें जैसे आपके SendGrid स्टैट्स करते थे।
  • custom_args हर इवेंट में echo होते थे। हमारा metadata उसी तरह काम करता है। हम आपके metadata (और tags) को हर webhook इवेंट पर email_id/recipient_id के साथ echo करते हैं, ताकि आपके हैंडलर्स को अतिरिक्त लुकअप के बिना आपका कॉन्टेक्स्ट वापस मिल जाए।
  • डायनामिक टेम्प्लेट स्टोर्ड टेम्प्लेट में पोर्ट होते हैं। template_id और dynamic_template_data मिलकर template (ID या slug से रेफ़रेंस किया गया) और template.parameters बन जाते हैं, उसी send कॉल पर। देखें टेम्प्लेट से भेजनाsend_at सीधे scheduled_at पर मैप होता है।
  • अटैचमेंट सीधे पोर्ट होते हैं। SendGrid का attachments (base64 content, type, filename, इनलाइन के लिए content_id) हमारे attachments array में फ़ील्ड-दर-फ़ील्ड मैप होता है।
  • अनसब्सक्राइब ग्रुप (asm) एक कॉन्सेप्ट के रूप में पोर्ट नहीं होते: हम list-unsubscribe को कैटेगरी स्तर पर हैंडल करते हैं, इसलिए marketing मेल को suppression-aware अनसब्सक्राइब हैंडलिंग स्वचालित रूप से मिलती है।

Suppressions एक्सपोर्ट करें

SendGrid suppressions को अलग-अलग endpoints में बाँटता है; हर एक को एक्सपोर्ट करें और इम्पोर्ट लूप से गुज़ारें:
  • GET /v3/suppression/bounces
  • GET /v3/suppression/spam_reports
  • GET /v3/suppression/unsubscribes (ग्लोबल अनसब्सक्राइब)
  • हर उस अनसब्सक्राइब ग्रुप के लिए GET /v3/asm/groups/{group_id}/suppressions जिसे आप आगे ले जाना चाहते हैं

Webhook इवेंट ट्रांसलेट करें

परिणामSendGrid Event WebhookBird
स्वीकृत/प्रोसेस्डprocessedemail.acceptedemail.processed
डिलीवर हुआdeliveredemail.delivered
अस्थायी विफलताdeferredemail.deferred
स्थायी बाउंसbounceemail.bounced / email.out_of_band_bounce
स्पैम शिकायतspamreportemail.complained
ब्लॉक/सप्रेस्डdroppedemail.rejected
ओपनopenemail.opened
क्लिकclickemail.clicked
अनसब्सक्राइबunsubscribe / group_unsubscribeemail.unsubscribed / email.list_unsubscribed
droppedemail.rejected की समतुल्यता वह है जिसे टेस्ट करना ज़रूरी है: SendGrid की तरह, हम सप्रेस्ड प्राप्तकर्ताओं को दृश्य रूप में रिपोर्ट करते हैं (स्टेटस rejected, rejection_reason: recipient_suppressed) बजाय चुपचाप छोड़ने के, इसलिए आपका ऑडिट लॉजिक सीधे पोर्ट हो जाता है।
सत्यापन इवेंट नामों से ज़्यादा बदलता है: SendGrid का Event Webhook ECDSA पब्लिक की से साइन करता है, जबकि हम Standard Webhooks HMAC स्कीम के अनुसार साइन करते हैं। अपने सत्यापन कोड को Webhooks & events की रेसिपी से बदलें। SendGrid इवेंट्स को JSON arrays में बैच भी करता है। हम प्रति रिक्वेस्ट एक इवेंट डिलीवर करते हैं।

कटओवर

मुख्य गाइड में डोमेन और DNS और सैंडबॉक्स स्मोक टेस्ट पूरा करें। दोनों प्रोवाइडर-स्वतंत्र हैं।

अगले कदम

  • भेजने वाले डोमेन: रजिस्ट्रेशन, सत्यापन लाइफ़साइकल, और वे DNS रिकॉर्ड जिन्हें आप री-पॉइंट कर रहे हैं
  • Webhooks और इवेंट्स: endpoint सेटअप और Standard Webhooks सत्यापन
  • टेस्टिंग सैंडबॉक्स: कटओवर से पहले नए इंटीग्रेशन का स्मोक-टेस्ट करें
  • Suppressions: अपनी इम्पोर्ट की गई सूची की पुष्टि करें और जानें कि हम इसे आगे कैसे बनाए रखते हैं

संबंधित संसाधन

इस विषय के लिए डॉक्यूमेंटेशन, गाइड और उदाहरणों के साथ आगे बढ़ें। संसाधन अंग्रेज़ी में हैं।

अभ्यास करें और इम्प्लीमेंटेशन ब्रीफ़ पाएँ