Sign inGet Started

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

यह पेज Mailjet के Send API v3.1 पेलोड, ब्लॉकलिस्ट और Event API को Bird से मैप करता है। मुख्य माइग्रेशन गाइड का क्रम से पालन करें, और चरण 1, 3 और 4 के लिए इन मैपिंग का उपयोग करें।

सबसे बड़ा संरचनात्मक बदलाव envelope में है। Mailjet हर send को PascalCase ऑब्जेक्ट्स के एक Messages array में लपेटता है (POST /v3.1/send)। हम प्रति POST /v1/email/messages एक फ़्लैट, lowercase JSON ऑब्जेक्ट लेते हैं, और कई स्वतंत्र संदेश Messages array के बजाय batch endpoint पर भेजे जाते हैं।

इसे अपने एजेंट को सौंपें

इसे Claude Code, Cursor या Codex में पेस्ट करें। एजेंट आपके अपने repository पर इस पेज के अनुसार काम करता है, और उसके पास पहले से जो भी Bird सुविधा उपलब्ध है उसका उपयोग करता है: अगर MCP सर्वर जुड़ा है तो वह, और अगर CLI इंस्टॉल है और उसमें साइन इन है तो वह।

कोड उदाहरण
I am moving an email integration from Mailjet 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/mailjet.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 Mailjet usage in this repository before you change anything: the POST /v3.1/send call sites and any SDK wrappers around them, the event 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 blocklist from Mailjet 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. Read it through the contact-management API, or from the contact statistics pages if that is what I have access to. 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 event handler using the mapping tables on the provider page. Mailjet posts a Messages array of PascalCase objects, and each entry becomes either one flat Bird send or one entry in a batch, so tell me which shape my call sites map onto before you rewrite them. EventPayload becomes metadata. Bird signs deliveries per Standard Webhooks rather than Mailjet'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 Mailjet path is a separate step that comes later: ask me again and wait for me to reply with the words retire the Mailjet 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 कॉल को मैप करें

यह क्या करता हैMailjet (Send API v3.1)Bird
प्रेषकFrom: { "Email", "Name" }from: स्ट्रिंग या { "email", "name" }
प्राप्तकर्ताTo / Cc / Bcc: [{ "Email", "Name" }]to / cc / bcc: ऐरे
विषयSubjectsubject
मुख्य सामग्रीTextPart / HTMLParttext / html (कम से कम एक)
जवाब देने का पताReplyTo: { "Email", "Name" }reply_to: ऐरे
कस्टम हेडरHeadersheaders: string → string ऑब्जेक्ट
इवेंट में वापस लौटने वाला संदर्भEventPayload (स्ट्रिंग), इवेंट में वापस भेजा जाता हैmetadata: मनचाहा JSON
आपकी अपनी send IDCustomID, इवेंट में वापस भेजा जाता हैmetadata या tags
सहेजा गया टेम्पलेटTemplateID + Variablestemplate + template.parameters
अटैचमेंटAttachments: { "ContentType", "Filename", "Base64Content" }attachments: { "content_type", "filename", "content" }
इनलाइन इमेजInlinedAttachments, ContentID के साथattachments, content_id के साथ
ट्रैकिंगअकाउंट/टेम्पलेट सेटिंगtrack_opens / track_clicks (डिफ़ॉल्ट true)
श्रेणी(कोई नहीं)category: marketing (डिफ़ॉल्ट) या transactional

हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट मान (प्राप्तकर्ताओं की संख्या, टैग और मेटाडेटा की सीमाएँ) ईमेल भेजना पेज पर दी गई हैं।

पोर्ट करते समय ध्यान दें:

  • Messages ऐरे को खोलें। Mailjet में एक भेजा गया संदेश Messages की एक प्रविष्टि होता है। यहाँ वही पूरा अनुरोध बॉडी है। कई प्रविष्टियों वाला Messages ऐरे हमारे बैच एंडपॉइंट से मेल खाता है। एक ही अनुरोध में फ़ील्ड दोहराकर बैच नहीं बनाया जा सकता।
  • केस PascalCase से lowercase में बदलता है। हर फ़ील्ड का नाम बदलता है: HTMLPart → html, TextPart → text, From.Email → from.email। यह बदलाव यांत्रिक है, लेकिन हर भेजने वाले कॉल पर लागू होता है।
  • EventPayload की जगह metadata आता है। Mailjet हर इवेंट पर एक ही EventPayload स्ट्रिंग वापस भेजता है। हम हर वेबहुक इवेंट पर संरचित metadata (JSON) और tags वापस भेजते हैं, इसलिए आप सहसंबंध डेटा को टाइप किए गए फ़ील्ड में बाँट सकते हैं। टैग बनाम मेटाडेटा देखें।
  • CustomID एक सहसंबंध पहचानकर्ता है, और फिर से प्रयास के लिए अलग समाधान चाहिए। Mailjet का CustomID ट्रैकिंग के लिए इवेंट तक पहुँचता है, लेकिन यह डुप्लिकेट नहीं हटाता। उनका डुप्लिकेट रोकने का तरीका X-Mailjet-DeduplicateCampaign है। यह X-Mailjet-Campaign के साथ इस्तेमाल होने वाला boolean है, जो किसी कैंपेन को एक ही प्राप्तकर्ता तक दो बार पहुँचने से रोकता है। यह गारंटी कैंपेन के दायरे में है, किसी एक अनुरोध के सुरक्षित फिर से प्रयास की नहीं। यहाँ अपना सहसंबंध ID metadata या tags में रखें, और दोबारा भेजे गए अनुरोध को सुरक्षित बनाने के लिए Idempotency-Key हेडर का इस्तेमाल करें।
  • संग्रहीत टेम्पलेट सीधे पोर्ट होते हैं। Mailjet के TemplateID + Variables हमारे template फ़ील्ड (ID या slug से संदर्भित) से मेल खाते हैं, और मान template.parameters में जाते हैं। टेम्पलेट के साथ भेजना देखें। वेरिएबल बदलने से आगे का टेम्पलेट लॉजिक भी पोर्ट होता है: Mailjet के TemplateLanguage conditionals और loops हमारे टेम्पलेट में Liquid {% if %} और {% for %} बन जाते हैं।
  • अटैचमेंट सीधे पोर्ट होते हैं। Mailjet का Base64Content हमारा base64 content है, और InlinedAttachments + ContentID, content_id वाली attachments प्रविष्टियाँ बन जाते हैं। अटैचमेंट देखें।

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

Mailjet पहुँच से बाहर और अवांछित पतों को अपनी ब्लॉकलिस्ट में रखता है (हार्ड/सॉफ़्ट बाउंस और ब्लॉक किए गए संदेश), और स्पैम व अनसब्सक्राइब संकेतों को अलग से ट्रैक करता है। ब्लॉक और बाउंस हुए पते Mailjet के संपर्क आँकड़ों वाले पेजों से एक्सपोर्ट करें, या संपर्क प्रबंधन API से निकालें, फिर सूची को इम्पोर्ट लूप से चलाएँ। अगर आप मार्केटिंग मेल भेजते हैं, तो अनसब्सक्राइब चिह्नित संपर्कों को भी साथ लाएँ, ताकि माइग्रेशन के बाद भी उनकी प्राथमिकताएँ बनी रहें।

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

Mailjet का Event API हर इवेंट प्रकार के लिए एक ट्रिगर भेजता है। हमारी इवेंट शब्दावली से इनका मिलान इस प्रकार है:

परिणामMailjetBird
स्वीकृत/प्रोसेस किया गया(कोई नहीं)email.accepted → email.processed
डिलीवर हुआsentemail.delivered
स्थायी बाउंसbounceemail.bounced / email.out_of_band_bounce
ब्लॉक किया गयाblockedemail.rejected
स्पैम शिकायतspamemail.complained
खोला गयाopenemail.opened
क्लिकclickemail.clicked
सदस्यता रद्द करनाunsubemail.unsubscribed / email.list_unsubscribed

दो अंतर, जिनके लिए आपको कोड लिखना होगा:

  • हम डिलीवरी से पहले के चरणों की रिपोर्ट अलग से देते हैं। Mailjet का sent तब ट्रिगर होता है जब प्राप्तकर्ता का मेल सर्वर संदेश स्वीकार कर लेता है, और यह हमारे email.delivered के बराबर है। हम उससे पहले email.accepted और email.processed भी भेजते हैं, ताकि डिलीवरी की पुष्टि से पहले ही आप देख सकें कि भेजा गया संदेश किस चरण में है। इन शुरुआती इवेंट को डिलीवरी न मानें।
  • इवेंट हर प्राप्तकर्ता के लिए अलग होते हैं। Mailjet इवेंट को MessageID के आधार पर पहचानता है। हमारे डिलीवरी इवेंट में email_id के साथ recipient_id भी होता है, इसलिए कई प्राप्तकर्ताओं वाला एक संदेश हर प्राप्तकर्ता के लिए अलग इवेंट स्ट्रीम बनाता है। हम डिलीवरी पर Standard Webhooks स्पेसिफिकेशन के अनुसार हस्ताक्षर करते हैं। सत्यापन के लिए वेबहुक और इवेंट देखें।

स्विच करें

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

अगले कदम

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

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