Send Transactional Email
Send personalized transactional emails to your customers for loyalty program updates, order confirmations, reward notifications, and engagement campaigns.
Quick Start
Basic Email Request
POST https://api.brevo.com/v3/smtp/emailContent-Type: application/jsonapi-key: YOUR_API_KEY
{ "sender": { "name": "Tajo Loyalty", }, "to": [ { "name": "Customer Name" } ], "subject": "Your loyalty points have been updated!", "htmlContent": "<h1>Loyalty Update</h1><p>You earned 100 points from your recent purchase!</p>", "textContent": "Loyalty Update: You earned 100 points from your recent purchase!"}Response
{}Loyalty Program Use Cases
Welcome Email for New Customers
{ "sender": { "name": "Tajo Loyalty Program", }, "to": [ { "email": "{{params.email}}", "name": "{{params.name}}" } ], "templateId": 1, "params": { "name": "John Doe", "welcomeBonus": "500", "loyaltyTier": "Bronze" }}Points Balance Update
{ "subject": "Points Balance Update - {{params.pointsEarned}} Points Added", "params": { "customerName": "John Doe", "pointsEarned": "150", "totalPoints": "1,250", "transactionType": "Purchase", "orderNumber": "ORD-2024-001" }}Reward Redemption Confirmation
{ "subject": "Reward Redeemed Successfully", "params": { "rewardName": "10% Off Next Purchase", "pointsUsed": "1000", "remainingPoints": "250", "couponCode": "SAVE10NOW", "expiryDate": "2024-03-15" }}Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
sender | Object | Yes | Sender information |
to | Array | Yes | Recipient list (max 50) |
subject | String | Yes | Email subject line |
htmlContent | String | No | HTML email content |
textContent | String | No | Text email content |
templateId | Integer | No | Template ID (alternative to content) |
params | Object | No | Template parameters |
headers | Object | No | Custom headers |
attachment | Array | No | File attachments |
Advanced Features for Tajo
Customer Segmentation
{ "to": [ { "name": "Premium Customer" } ], "params": { "loyaltyTier": "Premium", "personalizedOffers": [ "Exclusive 20% off luxury items", "Free premium shipping" ] }}A/B Testing Setup
{ "subject": "{{params.subjectVariant}}", "params": { "subjectVariant": "Limited Time: Double Points Weekend!", "contentVariant": "premium", "testGroup": "A" }}Error Handling
{ "code": "invalid_parameter", "message": "Email address is invalid", "details": { "field": "to[0].email", "value": "invalid-email" }}