Brevo Connector

Brevo Connector

Connect your Brevo account to Tajo for unified contact management, transactional messaging across email, SMS, and WhatsApp, and comprehensive marketing automation.

Overview

PropertyValue
PlatformBrevo
CategoryMarketing
Setup ComplexityEasy
Official IntegrationYes
Data SyncedContacts, Campaigns, Transactional Messages, Events, eCommerce
API Base URLhttps://api.brevo.com/v3

Features

  • Multi-channel messaging - Send transactional email, SMS, and WhatsApp from a unified API
  • Contact management - Create, update, and segment contacts with custom attributes
  • Marketing campaigns - Programmatically create and send email campaigns
  • Event tracking - Track custom events and website activity via the Brevo Tracker
  • eCommerce sync - Sync products, orders, and cart data for personalized campaigns
  • Loyalty programs - Manage loyalty subscriptions, points, and member data
  • Webhook support - Real-time event notifications for transactional, marketing, and CRM events
  • Conversations - Live chat widget integration and programmatic message management

Prerequisites

Before you begin, ensure you have:

  1. A Brevo account (Free, Starter, Business, or Enterprise plan)
  2. An API key generated from Brevo Settings > API Keys
  3. A Tajo account with API access
  4. Verified sender domain for email sending

Authentication

Brevo supports two authentication methods:

Include your API key in the api-key header with each request. Best for direct integrations and server-to-server communication.

Terminal window
curl -X GET "https://api.brevo.com/v3/account" \
-H "api-key: YOUR_API_KEY" \
-H "Content-Type: application/json"

OAuth 2.0 Authentication

Use OAuth 2.0 for private integrations within an organization that require delegated access and user-specific permissions. OAuth provides a token-based system with defined validity periods.

OAuth Availability

OAuth is currently only available for private integrations inside an organization. OAuth integrations are not intended for public distribution or marketplace listing.

Configuration

Basic Setup

connectors:
brevo:
enabled: true
api_key: "${BREVO_API_KEY}"
api_version: "v3"
# Data sync options
sync:
contacts: true
campaigns: true
transactional: true
events: true
ecommerce: true
# List assignment
lists:
all_customers: 5
newsletter: 6
buyers: 7

Field Mapping

Map your data fields to Brevo contact attributes:

Default Mappings

Parameter Type Description
email required
string

Contact email address (unique identifier)

FIRSTNAME optional
string

Contact first name attribute

LASTNAME optional
string

Contact last name attribute

SMS optional
string

Phone number for SMS and WhatsApp messaging

OPT_IN optional
boolean

Marketing opt-in consent status

ORDER_COUNT optional
integer

Total number of orders placed

TOTAL_REVENUE optional
number

Lifetime revenue from the contact

LOYALTY_POINTS optional
integer

Current loyalty program points balance

Custom Attribute Mapping

field_mapping:
# Standard fields
email: email
first_name: FIRSTNAME
last_name: LASTNAME
phone: SMS
# Marketing fields
opt_in: OPT_IN
signup_source: SIGNUP_SOURCE
preferred_language: LANGUAGE
# eCommerce metrics
orders_count: ORDER_COUNT
total_spent: TOTAL_REVENUE
last_order_date: LAST_ORDER_DATE
# Loyalty fields
loyalty_tier: VIP_TIER
loyalty_points: LOYALTY_POINTS

API Endpoints

Core Endpoints

MethodEndpointDescription
POST/v3/smtp/emailSend transactional email
POST/v3/transactionalSMS/sendSend transactional SMS
POST/v3/whatsapp/sendMessageSend transactional WhatsApp
POST/v3/contactsCreate a contact
PUT/v3/contacts/{email}Update a contact
GET/v3/contacts/{identifier}Get contact details
POST/v3/contacts/importBulk import contacts

eCommerce Endpoints

MethodEndpointDescription
POST/v3/orders/statusCreate or update order status
POST/v3/productsCreate or update products
POST/v3/categoriesCreate or update product categories
POST/v3/eventsTrack custom events

Campaign Endpoints

MethodEndpointDescription
POST/v3/emailCampaignsCreate an email campaign
POST/v3/emailCampaigns/{id}/sendNowSend a campaign immediately
GET/v3/emailCampaignsList all email campaigns
GET/v3/smtp/statistics/eventsGet email event statistics

Events

Transactional Events

EventTriggerUse Case
deliveredEmail delivered to inboxDelivery confirmation
openedEmail opened by recipientEngagement tracking
clickedLink clicked in emailClick-through tracking
bouncedEmail bouncedList hygiene
spamMarked as spamCompliance monitoring
unsubscribedContact unsubscribedPreference management

eCommerce Events

EventTriggerUse Case
order_completedOrder placed successfullyPost-purchase flows
cart_updatedCart contents changedAbandoned cart tracking
cart_deletedCart cleared or expiredCart recovery
product_viewedProduct page visitedBrowse abandonment

Code Examples

Initialize Connector

import { TajoClient } from '@tajo/sdk';
const tajo = new TajoClient({
apiKey: process.env.TAJO_API_KEY,
brevoApiKey: process.env.BREVO_API_KEY
});
// Connect Brevo account
await tajo.connectors.connect('brevo', {
apiKey: process.env.BREVO_API_KEY
});

Send Transactional Email

// Send a transactional email via Brevo
await tajo.brevo.sendTransactionalEmail({
to: [{ email: '[email protected]', name: 'John Doe' }],
templateId: 12,
params: {
ORDER_ID: '12345',
ORDER_TOTAL: '$59.99',
DELIVERY_DATE: '2024-02-15'
}
});

Sync Contacts

// Bulk import contacts to Brevo
await tajo.connectors.sync('brevo', {
type: 'full',
resources: ['contacts'],
options: {
listIds: [5, 6],
updateExisting: true,
emptyContactsAttributes: false
}
});
// Check sync status
const status = await tajo.connectors.status('brevo');
console.log(status);
// {
// connected: true,
// lastSync: '2024-01-15T10:30:00Z',
// contactsSynced: 25400,
// campaignsSent: 142,
// eventsTracked: 89320
// }

Track Custom Events

// Track a custom event for a contact
await tajo.brevo.trackEvent({
event: 'product_purchased',
eventdata: {
id: 'txn_98765',
data: {
product_name: 'Premium Widget',
price: 49.99,
currency: 'USD'
}
}
});

Rate Limits

Brevo enforces rate limits across three tiers based on your plan:

EndpointFree/StarterProfessionalEnterprise
POST /v3/smtp/email1,000 RPS2,000 RPS6,000 RPS
POST /v3/transactionalSMS/send150 RPS200 RPS250 RPS
POST /v3/events10 RPS20 RPS60 RPS
/v3/contacts/*10 RPS20 RPS60 RPS
All other endpoints100 RPH200 RPH600 RPH

Rate Limit Response

When you exceed a rate limit, the API returns a 429 Too Many Requests status code. Monitor the rate limit headers in responses to track your usage.

Troubleshooting

Common Issues

IssueCauseSolution
401 UnauthorizedInvalid API keyRegenerate API key in Brevo Settings
Contact not createdMissing email fieldEnsure email is provided for all contacts
Email not deliveredUnverified sender domainVerify domain in Brevo Senders settings
Webhook not receivedIncorrect URL or server errorCheck webhook URL accessibility and logs
SMS not sentInvalid phone formatUse international format with country code

Debug Mode

Enable verbose logging:

connectors:
brevo:
debug: true
log_level: verbose
log_webhooks: true

Test Connection

Terminal window
tajo connectors test brevo
# ✓ API connection successful
# ✓ Contacts API accessible
# ✓ Transactional email ready
# ✓ SMS sending configured
# ✓ Webhooks registered

Best Practices

  1. Use API key rotation - Rotate API keys periodically for security
  2. Implement webhook verification - Validate webhook signatures with username/password authentication
  3. Batch contact imports - Use bulk import for large datasets instead of individual API calls
  4. Monitor rate limits - Check rate limit headers to avoid 429 errors
  5. Use event tracking - Implement the Brevo Tracker for comprehensive customer behavior data
  6. Set up proper sender authentication - Configure SPF, DKIM, and DMARC for optimal deliverability

Security

  • API Key Authentication - Secret token-based access via api-key header
  • OAuth 2.0 - Token-based delegated access for private integrations
  • Webhook verification - Username and password authentication for secure webhook calls
  • TLS encryption - All API communication encrypted in transit
  • IP whitelisting - Optional IP restrictions available on Enterprise plans
AI-assistent

Hej! Fråga mig om dokumentationen.

Börja gratis med Brevo