Brevo से माइग्रेशन
यह पेज Brevo के transactional send पेलोड, ब्लॉकलिस्ट और webhooks को Bird पर मैप करता है। मुख्य माइग्रेशन गाइड को क्रम से फ़ॉलो करें, और स्टेप 1, 3 और 4 के लिए इन मैपिंग का उपयोग करें।
Brevo suppressions को दो असंबंधित जगहों पर रखता है, एक transactional मेल के लिए और एक marketing के लिए। स्टेप 3 की योजना बनाने से पहले Suppressions एक्सपोर्ट करें पढ़ें: एक एक्सपोर्ट करके दूसरा छोड़ देना वह गलती है जो इस माइग्रेशन में होती है।
इसे अपने agent को दें
इसे Claude Code, Cursor या Codex में पेस्ट करें। Agent इस पेज को आपकी अपनी repository के साथ प्रोसेस करता है, जो भी Bird सरफ़ेस उसके पास पहले से है उसका उपयोग करके: MCP सर्वर अगर कनेक्टेड है, CLI अगर इंस्टॉल और साइन इन है।
कोड उदाहरण
I am moving an email integration from Brevo 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/brevo.md for the payload, suppression and webhook mapping, and https://bird.com/docs/guides/email/migrate.md for the order the steps go in.
3. Find and list my Brevo usage in this repository before you change anything: calls to /v3/smtp/email and any SDK wrappers around them, whether I send with templateId or with htmlContent, the webhook handler and the URL it is registered at, and every domain I send from. Tell me the list before you edit anything.
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 Brevo 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 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. Brevo holds these in two separate places and I need both: GET /v3/smtp/blockedContacts for transactional blocks and unsubscribes, and the marketing blocklist, which lives on the contact records as emailBlacklisted rather than on a suppression endpoint. Page through both. 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. Brevo's webhook security page documents credentials I configure on the endpoint rather than a payload signature, so check what my endpoint actually relies on today: if it is a username and password in the webhook URL, take them out and tell me to rotate that pair rather than reusing it, because a credential that has lived in a URL should be treated as exposed. Bird signs every delivery instead. 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 Brevo path is a separate step that comes later: ask me again and wait for me to reply with the words retire the Brevo 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 कॉल को मैप करें
Brevo का POST /v3/smtp/email और हमारा POST /v1/email/messages संरचना में काफ़ी मिलते-जुलते हैं। ज़्यादातर काम Brevo के address objects को सादी strings में बदलना है।
| क्या करता है | Brevo | Bird |
|---|---|---|
| Auth | api-key हेडर | Authorization: Bearer |
| प्रेषक | sender ({email, name}) | from |
| प्राप्तकर्ता | to / cc / bcc ({email, name} के arrays) | to / cc / bcc (addresses के arrays) |
| विषय | subject | subject |
| बॉडी | htmlContent / textContent | html / text (कम से कम एक) |
| Reply-to | replyTo ({email, name}) | reply_to (array) |
| कस्टम हेडर | headers (Title-Case keys) | headers (string → string object) |
| फ़िल्टर करने योग्य लेबल | tags (strings का array) | tags: {name, value} pairs |
| संग्रहित टेम्पलेट | templateId + params | template + template.parameters |
| अटैचमेंट | attachment (url या base64 content) | attachments (केवल base64, नीचे देखें) |
| शेड्यूलिंग | scheduledAt | scheduled_at |
| बैच हैंडल | batchId | (कोई समकक्ष नहीं, नीचे देखें) |
| प्रति-प्राप्तकर्ता कॉपी | messageVersions | प्रति version एक send, या एक batch |
| श्रेणी | (कोई नहीं) | category: marketing (डिफ़ॉल्ट) या transactional |
हमारी फ़ील्ड सीमाएँ और डिफ़ॉल्ट (प्राप्तकर्ता संख्या, tag और metadata सीमाएँ) ईमेल भेजना में हैं।
पोर्टिंग नोट्स:
- वहाँ addresses objects हैं और यहाँ strings हैं। {"email": "a@x.com", "name": "A"} बन जाता है "A <a@x.com>" या सिर्फ़ "a@x.com"। यही unwrapping sender और replyTo पर भी लागू होती है।
- tags सादी strings हैं। हमारे tags pairs हैं। "welcome" जैसा tag {"name": "category", "value": "welcome"} बन जाता है। एक स्थिर name चुनें ताकि आपके डैशबोर्ड वैसे ही फ़िल्टर करें जैसे आपके Brevo tag stats करते थे।
- params टेम्पलेट डेटा है, राउंड-ट्रिप कॉन्टेक्स्ट नहीं। यह template.parameters बन जाता है। अगर आप इसका उपयोग अपने identifier इवेंट तक पहुँचाने के लिए भी कर रहे थे, तो उन्हें metadata में ले जाएँ, जो हम हर webhook इवेंट पर email_id/recipient_id के साथ वापस भेजते हैं।
- messageVersions का कोई single-call समकक्ष नहीं है। हर version एक अलग प्राप्तकर्ता सेट और पेलोड है, इसलिए यह या तो अपना अलग send बनता है या batch में एक entry।
- batchId का कोई समकक्ष नहीं है। Brevo का batchId शेड्यूल किए गए संदेशों को ग्रुप करता है ताकि आप उन्हें एक साथ रद्द या रीशेड्यूल कर सकें। यहाँ शेड्यूल किए गए sends को उनके message id से अलग-अलग संबोधित किया जाता है; पास करने या रद्द करने के लिए कोई ग्रुप हैंडल नहीं है।
- URL द्वारा अटैचमेंट समर्थित नहीं है। Brevo एक attachment entry को URL के रूप में स्वीकार करता है ताकि वह उसे फ़ेच कर सके। फ़ाइल स्वयं फ़ेच करें और base64-encoded भेजें; attachments देखें।
Suppressions एक्सपोर्ट करें
Brevo suppressions को दो ऐसे सिस्टम में बाँटता है जिनका न endpoint साझा है न pagination स्कीम, और जो माइग्रेशन केवल पहला पुल करता है वह चुपचाप हर marketing unsubscribe खो देता है:
- Transactional blocks और unsubscribes: GET /v3/smtp/blockedContacts, paginated (डिफ़ॉल्ट रूप से 50 प्रति पेज, अधिकतम 100), हर entry में block होने का कारण होता है।
- Marketing ब्लॉकलिस्ट: यह कोई suppression endpoint नहीं है। यह contact record पर emailBlacklisted के रूप में रहता है, इसलिए GET /v3/contacts को पेजिनेट करें (offset के साथ प्रति पेज 1,000 तक) और उन contacts को रखें जहाँ यह flag true है।
दोनों को इंपोर्ट लूप से चलाएँ। Brevo के block reasons हमारे hard_bounce, complaint, और manual reasons पर मैप होते हैं; Suppressions में पूरी taxonomy है।
Webhook इवेंट ट्रांसलेट करें
| परिणाम | Brevo | Bird |
|---|---|---|
| स्वीकृत/प्रोसेस किया | request | email.accepted → email.processed |
| डिलीवर हुआ | delivered | email.delivered |
| अस्थायी विफलता | deferred / soft_bounce | email.deferred |
| स्थायी बाउंस | hard_bounce | email.bounced / email.out_of_band_bounce |
| स्पैम शिकायत | spam | email.complained |
| ब्लॉक/suppressed | blocked / invalid_email | email.rejected |
| ओपन | opened / unique_opened | email.opened |
| क्लिक | click | email.clicked |
| अनसब्सक्राइब | unsubscribed | email.unsubscribed / email.list_unsubscribed |
दो अंतर तय करते हैं कि आपके handler में कितना बदलाव होगा।
पोर्ट करने से पहले जाँचें कि आपका endpoint आज किस पर निर्भर है। Brevo का webhook security पेज उन credentials को दस्तावेज़ित करता है जो आप endpoint पर कॉन्फ़िगर करते हैं: URL में https://username:password@example.com/ के रूप में जोड़ा गया username और password, एक bearer token, कस्टम request हेडर, और उसकी IP ranges। हम इसके बजाय हर डिलीवरी पर Standard Webhooks HMAC स्कीम के अनुसार साइन करते हैं, इसलिए सत्यापन कॉलर द्वारा लाई गई चीज़ से बदलकर आपके handler द्वारा गणना की जाने वाली चीज़ बन जाता है। अगर आपके मौजूदा endpoint में URL में credentials हैं, तो उन्हें हटाएँ और उस pair को रोटेट करें बजाय इसके कि उसे दोबारा उपयोग करें: जो credential URL में रहा है वह access logs, config exports और vendor console तक पहुँच चुका है। तरीक़ा Webhooks and events में है।
Brevo opens और clicks को उनके unique variants से अलग करता है। हम नहीं करते। opened और unique_opened दोनों email.opened के रूप में आते हैं, इसलिए जो handler केवल unique variant गिनता था उसे recipient_id पर स्वयं deduplicate करना होगा। हमारे delivery events प्राप्तकर्ता-स्कोप्ड हैं, इसलिए तीन प्राप्तकर्ताओं को भेजा गया send एक नहीं बल्कि तीन delivery outcomes देता है।
कटओवर
मुख्य गाइड में domains और DNS और sandbox स्मोक टेस्ट पूरा करें। दोनों provider-independent हैं।
अगले कदम
- Sending domains: रजिस्ट्रेशन, सत्यापन लाइफ़साइकल, और आप जो DNS records प्रकाशित कर रहे हैं
- Webhooks and events: endpoint सेटअप और Standard Webhooks सत्यापन
- Testing sandbox: कटओवर से पहले नए integration का स्मोक-टेस्ट करें
- Suppressions: अपनी इंपोर्ट की गई सूची की पुष्टि करें और जानें कि हम इसे आगे कैसे बनाए रखते हैं
संबंधित संसाधन
इस विषय के लिए डॉक्यूमेंटेशन, गाइड और उदाहरणों के साथ आगे बढ़ें। संसाधन अंग्रेज़ी में हैं।
गाइड देखेंGetting started with emailक्षमता जानेंEmailलर्निंग पाथ फ़ॉलो करेंBuild your first integrationइम्प्लीमेंटेशन गाइडSend your first email
अभ्यास करें और इम्प्लीमेंटेशन ब्रीफ़ पाएँ