申请抢先体验

请填写名字,以及邮箱或手机号。我们会与您联系,提供 Tajo 访问详情。

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/email
Content-Type: application/json
api-key: YOUR_API_KEY
{
"sender": {
"name": "Tajo Loyalty",
"email": "[email protected]"
},
"to": [
{
"email": "[email protected]",
"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

{
"messageId": "<[email protected]>"
}

Loyalty Program Use Cases

Welcome Email for New Customers

{
"sender": {
"name": "Tajo Loyalty Program",
"email": "[email protected]"
},
"to": [
{
"email": "{{params.email}}",
"name": "{{params.name}}"
}
],
"templateId": 1,
"params": {
"name": "John Doe",
"email": "[email protected]",
"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

ParameterTypeRequiredDescription
senderObjectYesSender information
toArrayYesRecipient list (max 50)
subjectStringYesEmail subject line
htmlContentStringNoHTML email content
textContentStringNoText email content
templateIdIntegerNoTemplate ID (alternative to content)
paramsObjectNoTemplate parameters
headersObjectNoCustom headers
attachmentArrayNoFile attachments

Advanced Features for Tajo

Customer Segmentation

{
"to": [
{
"email": "[email protected]",
"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"
}
}

Next Steps

  • Set up Email Templates
  • Configure SMS Integration
  • Track Email Events
  • Loyalty Program Integration

申请抢先体验

请填写名字,以及邮箱或手机号。我们会与您联系,提供 Tajo 访问详情。

自动识别
AI 助手

你好!关于文档有任何问题都可以问我。