Sign inGet Started

Mailjet से माइग्रेशन

यह पेज Mailjet के Send API v3.1 पेलोड, ब्लॉकलिस्ट और Event API को Bird पर मैप करता है। मुख्य माइग्रेशन गाइड को क्रम से फ़ॉलो करें, और इन मैपिंग का उपयोग स्टेप 1, 3 और 4 के लिए करें।
सबसे बड़ा स्ट्रक्चरल बदलाव एनवेलप में है। Mailjet हर send को PascalCase ऑब्जेक्ट्स (POST /v3.1/send) की एक Messages array में wrap करता है। हम प्रति POST /v1/email/messages एक फ़्लैट, lowercase JSON ऑब्जेक्ट लेते हैं, और कई स्वतंत्र मैसेज Messages array की बजाय batch endpoint पर जाते हैं।

इसे अपने agent को दें

इसे Claude Code, Cursor या Codex में पेस्ट करें। agent आपकी अपनी रिपॉज़िटरी पर इस पेज के अनुसार काम करता है, जो भी 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: string या { "email", "name" }
प्राप्तकर्ताTo / Cc / Bcc: [{ "Email", "Name" }]to / cc / bcc: arrays
विषयSubjectsubject
बॉडीTextPart / HTMLParttext / html (कम से कम एक)
Reply-toReplyTo: { "Email", "Name" }reply_to: array
कस्टम हेडरHeadersheaders: string → string object
राउंड-ट्रिप कॉन्टेक्स्टEventPayload (string), events पर echo होता हैmetadata: arbitrary JSON
आपका अपना send IDCustomID, events पर echo होता हैmetadata या tags
स्टोर्ड टेम्पलेटTemplateID + Variablestemplate + template.parameters
अटैचमेंटAttachments: { "ContentType", "Filename", "Base64Content" }attachments: { "content_type", "filename", "content" }
इनलाइन इमेजInlinedAttachments, ContentID के साथattachments content_id के साथ
ट्रैकिंगaccount/template सेटिंगtrack_opens / track_clicks (default true)
श्रेणी(कोई नहीं)category: marketing (default) या transactional
हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट (प्राप्तकर्ता संख्या, tag और metadata सीमाएँ) ईमेल भेजना में हैं।
पोर्टिंग नोट्स:
  • Messages array को अनरैप करें। एक Mailjet send Messages में एक एंट्री है। यहाँ, यह पूरा request body है। कई एंट्रीज़ वाली Messages array हमारे batch endpoint पर मैप होती है। एक request में रिपीटेड फ़ील्ड batch को रिप्रेज़ेंट नहीं कर सकती।
  • केस PascalCase से lowercase में बदलता है। हर फ़ील्ड का नाम बदलता है: HTMLPart → html, TextPart → text, From.Email → from.email। यह मैकेनिकल है लेकिन हर send को प्रभावित करता है।
  • EventPayload अब metadata बन जाता है। Mailjet हर event पर एक EventPayload string echo करता है। हम हर webhook event पर structured metadata (JSON) और tags echo करते हैं, ताकि आप correlation data को typed फ़ील्ड में विभाजित कर सकें। देखें tags vs metadata।
  • CustomID एक correlation handle है, और फिर से प्रयास करने के लिए अलग उत्तर चाहिए। Mailjet का CustomID ट्रैकिंग के लिए events तक पहुँचता है; यह deduplicate नहीं करता। उनका deduplication X-Mailjet-DeduplicateCampaign है, X-Mailjet-Campaign के साथ उपयोग होने वाला एक boolean जो किसी campaign को एक ही प्राप्तकर्ता तक दोबारा पहुँचने से रोकता है, यानी campaign-scoped गारंटी है, एक request का safe retry नहीं। यहाँ, अपना correlation ID metadata या tags में रखें, और retried request को safe बनाने के लिए Idempotency-Key हेडर का उपयोग करें।
  • स्टोर्ड टेम्पलेट सीधे पोर्ट होते हैं। Mailjet का TemplateID + Variables हमारे template फ़ील्ड (ID या slug से referenced) पर मैप होता है, values template.parameters में। देखें टेम्पलेट के साथ भेजना। वेरिएबल substitution से परे templating लॉजिक भी पोर्ट होता है: Mailjet के TemplateLanguage conditionals और loops हमारे टेम्पलेट में Liquid {% if %} और {% for %} बन जाते हैं।
  • अटैचमेंट सीधे पोर्ट होते हैं। Mailjet का Base64Content हमारा base64 content है, और InlinedAttachments + ContentID content_id के साथ attachments एंट्रीज़ बन जाते हैं। देखें अटैचमेंट।

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

Mailjet अप्राप्य और अवांछित पतों को अपनी ब्लॉकलिस्ट (hard/soft bounce और blocked send) पर रखता है और spam व unsubscribe सिग्नल अलग से ट्रैक करता है। Mailjet के contact statistics पेज से blocked और bounced पते एक्सपोर्ट करें, या उन्हें contact management API से पुल करें, और सूची को import loop से गुज़ारें। अगर आप मार्केटिंग मेल भेजते हैं, तो unsubscribed मार्क किए गए contacts भी ट्रांसफ़र करें ताकि वे प्राथमिकताएँ माइग्रेशन में बनी रहें।

Webhook events ट्रांसलेट करें

Mailjet का Event API प्रति event type एक trigger पोस्ट करता है। हमारी event शब्दावली से मैपिंग:
परिणाम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 तब fire होता है जब प्राप्तकर्ता का mail server मैसेज स्वीकार कर लेता है, जो हमारे email.delivered के बराबर है। हम इससे पहले email.accepted और email.processed भी emit करते हैं, ताकि आप delivery confirmation से पहले send की प्रगति देख सकें। उन पहले के events को delivery न मानें।
  • Events प्राप्तकर्ता-स्कोप्ड होते हैं। Mailjet events को MessageID से key करता है। हमारे delivery events में email_id के साथ recipient_id भी होता है, इसलिए multi-recipient send प्रति प्राप्तकर्ता एक event stream बनाता है। हम Standard Webhooks spec के अनुसार deliveries साइन करते हैं। सत्यापन के लिए देखें Webhooks & events।

कटओवर

मुख्य गाइड में domains & DNS और sandbox smoke test पर काम करें। दोनों provider-independent हैं।

अगले कदम

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

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

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

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