Sign inGet Started

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

यह पेज SendGrid के v3 Mail Send पेलोड, सप्रेशन सूचियों और 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 प्रविष्टि)।

यह क्या करता हैSendGridBird
प्रेषकfrom.emailfrom
प्राप्तकर्ताpersonalizations[].to / cc / bccto / cc / bcc (ऐरे)
विषयsubjectsubject
मुख्य भागcontent[] (type + value)html / text (कम से कम एक)
जवाब का पताreply_to / reply_to_listreply_to (ऐरे)
कस्टम हेडरheadersheaders (string → string ऑब्जेक्ट)
फ़िल्टर किए जा सकने वाले लेबल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 हर इवेंट में वापस भेजे जाते थे। हमारा metadata भी इसी तरह काम करता है। हम आपका metadata (और tags) हर वेबहुक इवेंट में email_id/recipient_id के साथ वापस भेजते हैं, ताकि आपके हैंडलर को अलग से खोज किए बिना आपका संदर्भ मिल जाए।
  • डायनेमिक टेम्पलेट स्टोर किए गए टेम्पलेट में पोर्ट होते हैं। template_id और dynamic_template_data उसी send कॉल में template (ID या slug से संदर्भित) और template.parameters बन जाते हैं। टेम्पलेट के साथ भेजना देखें। send_at सीधे scheduled_at से मैप होता है।
  • अटैचमेंट सीधे पोर्ट होते हैं। SendGrid के attachments (base64 content, type, filename, और इनलाइन के लिए content_id) हमारे अटैचमेंट ऐरे से फ़ील्ड-दर-फ़ील्ड मैप होते हैं।
  • अनसब्सक्राइब समूह (asm) एक अवधारणा के रूप में पोर्ट नहीं होते: हम list-unsubscribe को कैटेगरी स्तर पर संभालते हैं, इसलिए marketing मेल को सप्रेशन का ध्यान रखने वाली अनसब्सक्राइब हैंडलिंग अपने-आप मिलती है।

सप्रेशन एक्सपोर्ट करें

SendGrid सप्रेशन को अलग-अलग एंडपॉइंट में बाँटता है; हर एक को एक्सपोर्ट करें और उन्हें इम्पोर्ट लूप से चलाएँ:

  • GET /v3/suppression/bounces
  • GET /v3/suppression/spam_reports
  • GET /v3/suppression/unsubscribes (ग्लोबल अनसब्सक्राइब)
  • हर उस अनसब्सक्राइब समूह के लिए GET /v3/asm/groups/{group_id}/suppressions, जिसे आप साथ ले जाना चाहते हैं

वेबहुक इवेंट का अनुवाद करें

परिणामSendGrid Event WebhookBird
स्वीकार/प्रोसेस किया गयाprocessedemail.accepted → email.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

dropped ↔ email.rejected की समानता का परीक्षण ज़रूर करें। SendGrid की तरह, हम सप्रेस किए गए प्राप्तकर्ताओं को चुपचाप हटाने के बजाय उन्हें स्पष्ट रूप से रिपोर्ट करते हैं (स्टेटस rejected, rejection_reason: recipient_suppressed), इसलिए आपका ऑडिट लॉजिक बिना बदलाव के काम करता है।

सत्यापन में इवेंट नामों से ज़्यादा बदलाव होता है: SendGrid का Event Webhook ECDSA पब्लिक कुंजी से हस्ताक्षर करता है, जबकि हम Standard Webhooks की HMAC योजना के अनुसार हस्ताक्षर करते हैं। अपने सत्यापन कोड को वेबहुक और इवेंट में दिए गए तरीके से बदलें। SendGrid इवेंट को JSON ऐरे में बैच करके भी भेजता है। हम हर अनुरोध में एक इवेंट भेजते हैं।

कटओवर करें

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

अगले चरण

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

इस विषय के लिए दस्तावेज़, गाइड और उदाहरणों के साथ आगे बढ़ें।