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
| Property | Value |
|---|---|
| Platform | Brevo |
| Category | Marketing |
| Setup Complexity | Easy |
| Official Integration | Yes |
| Data Synced | Contacts, Campaigns, Transactional Messages, Events, eCommerce |
| API Base URL | https://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:
- A Brevo account (Free, Starter, Business, or Enterprise plan)
- An API key generated from Brevo Settings > API Keys
- A Tajo account with API access
- Verified sender domain for email sending
Authentication
Brevo supports two authentication methods:
API Key Authentication (Recommended)
Include your API key in the api-key header with each request. Best for direct integrations and server-to-server communication.
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: 7Field 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_POINTSAPI Endpoints
Core Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v3/smtp/email | Send transactional email |
POST | /v3/transactionalSMS/send | Send transactional SMS |
POST | /v3/whatsapp/sendMessage | Send transactional WhatsApp |
POST | /v3/contacts | Create a contact |
PUT | /v3/contacts/{email} | Update a contact |
GET | /v3/contacts/{identifier} | Get contact details |
POST | /v3/contacts/import | Bulk import contacts |
eCommerce Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v3/orders/status | Create or update order status |
POST | /v3/products | Create or update products |
POST | /v3/categories | Create or update product categories |
POST | /v3/events | Track custom events |
Campaign Endpoints
| Method | Endpoint | Description |
|---|---|---|
POST | /v3/emailCampaigns | Create an email campaign |
POST | /v3/emailCampaigns/{id}/sendNow | Send a campaign immediately |
GET | /v3/emailCampaigns | List all email campaigns |
GET | /v3/smtp/statistics/events | Get email event statistics |
Events
Transactional Events
| Event | Trigger | Use Case |
|---|---|---|
delivered | Email delivered to inbox | Delivery confirmation |
opened | Email opened by recipient | Engagement tracking |
clicked | Link clicked in email | Click-through tracking |
bounced | Email bounced | List hygiene |
spam | Marked as spam | Compliance monitoring |
unsubscribed | Contact unsubscribed | Preference management |
eCommerce Events
| Event | Trigger | Use Case |
|---|---|---|
order_completed | Order placed successfully | Post-purchase flows |
cart_updated | Cart contents changed | Abandoned cart tracking |
cart_deleted | Cart cleared or expired | Cart recovery |
product_viewed | Product page visited | Browse 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 accountawait tajo.connectors.connect('brevo', { apiKey: process.env.BREVO_API_KEY});Send Transactional Email
// Send a transactional email via Brevoawait tajo.brevo.sendTransactionalEmail({ templateId: 12, params: { ORDER_ID: '12345', ORDER_TOTAL: '$59.99', DELIVERY_DATE: '2024-02-15' }});Sync Contacts
// Bulk import contacts to Brevoawait tajo.connectors.sync('brevo', { type: 'full', resources: ['contacts'], options: { listIds: [5, 6], updateExisting: true, emptyContactsAttributes: false }});
// Check sync statusconst 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 contactawait 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:
| Endpoint | Free/Starter | Professional | Enterprise |
|---|---|---|---|
POST /v3/smtp/email | 1,000 RPS | 2,000 RPS | 6,000 RPS |
POST /v3/transactionalSMS/send | 150 RPS | 200 RPS | 250 RPS |
POST /v3/events | 10 RPS | 20 RPS | 60 RPS |
/v3/contacts/* | 10 RPS | 20 RPS | 60 RPS |
| All other endpoints | 100 RPH | 200 RPH | 600 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
| Issue | Cause | Solution |
|---|---|---|
| 401 Unauthorized | Invalid API key | Regenerate API key in Brevo Settings |
| Contact not created | Missing email field | Ensure email is provided for all contacts |
| Email not delivered | Unverified sender domain | Verify domain in Brevo Senders settings |
| Webhook not received | Incorrect URL or server error | Check webhook URL accessibility and logs |
| SMS not sent | Invalid phone format | Use international format with country code |
Debug Mode
Enable verbose logging:
connectors: brevo: debug: true log_level: verbose log_webhooks: trueTest Connection
tajo connectors test brevo# ✓ API connection successful# ✓ Contacts API accessible# ✓ Transactional email ready# ✓ SMS sending configured# ✓ Webhooks registeredBest Practices
- Use API key rotation - Rotate API keys periodically for security
- Implement webhook verification - Validate webhook signatures with username/password authentication
- Batch contact imports - Use bulk import for large datasets instead of individual API calls
- Monitor rate limits - Check rate limit headers to avoid 429 errors
- Use event tracking - Implement the Brevo Tracker for comprehensive customer behavior data
- Set up proper sender authentication - Configure SPF, DKIM, and DMARC for optimal deliverability
Security
- API Key Authentication - Secret token-based access via
api-keyheader - 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