Skip to main content

Overview

Brevo (formerly Sendinblue) provides European-hosted email delivery infrastructure engineered for enterprise compliance with GDPR and international data sovereignty standards. In BrokerOS, the Brevo integration lives as a self-contained TypeScript package in integrations/mail/brevo/src/index.ts under the Turborepo workspace package @brokeros/int-mail-brevo. BrokerOS administrators configure and manage Brevo directly through the Web UI at Dashboard -> Marketing -> Email -> Settings. Credentials are encrypted using AES-256-GCM and stored in the database (MarketingIntegration), requiring zero server restarts or .env modifications.

Architecture and Dispatch Sequence

The Brevo integration implements the IEmailMarketingProvider contract from @brokeros/types. During campaign execution, worker jobs stream batches through BrevoClient without blocking API request threads.

Step 1: Obtain Credentials from Brevo

  1. Log into your account at app.brevo.com.
  2. Click your profile name in the top right corner and navigate to SMTP & API.
  3. Under the API Keys tab, click Generate a new API key.
  4. Name your key (e.g. BrokerOS Production) and copy the generated key string. Brevo v3 API keys start with xkeysib- and are at least 40 characters long.
  5. Navigate to Senders, Domains & Dedicated IPs -> Domains, add your company sending domain, and publish the recommended DKIM (k=rsa; p=...) and Brevo code TXT records to your DNS provider.

Step 2: Connect in the BrokerOS Web Dashboard

In your BrokerOS dashboard, connect Brevo through the UI modal:
  1. Navigate to Dashboard -> Marketing -> Email -> Settings.
  2. Select the Providers & Domains tab (/dashboard/marketing/email/settings?tab=providers).
  3. Click Add Provider and select Brevo from the provider catalog.
  4. Fill in the modal connection fields:
  1. Click Verify & Connect. BrokerOS immediately tests connectivity with GET https://api.brevo.com/v3/account. Once verified, credentials are encrypted and stored in PostgreSQL (MarketingIntegration).

Step 3: Configure Webhook Delivery Telemetry

To capture real-time opens, clicks, and bounce suppression events:
  1. In your Brevo portal, navigate to Transactional -> Settings -> Webhook.
  2. Click Add a new webhook.
  3. Enter your BrokerOS webhook endpoint URL:
  4. Select checkboxes for Delivered, Opened, Clicked, Soft bounce, Hard bounce, Spam, and Unsubscribed.
  5. Save the webhook. BrokerOS BrevoWebhookParser handles event ingestion automatically.

Webhook Event Telemetry Mapping


Integration Implementation Details

The Brevo integration source code is maintained in integrations/mail/brevo/src/index.ts.

Live Account Verification

When submitting credentials in the UI, BrevoClient.validate() sends an authenticated ping to verify access rights:

Outbound Transactional Dispatch

Worker jobs dispatch outbound messages via POST https://api.brevo.com/v3/smtp/email with automatic campaign attribution tags: