---
title: "Send Email | Tajo"
description: "Send transactional emails via the Brevo API"
url: https://tajo.io/docs/email-messaging/transactional-email/send-email/
markdown: https://tajo.io/docs/email-messaging/transactional-email/send-email.md
lang: en-US
author: "Set Noa"
author_url: https://tajo.io/set-noa/
---

# Send Email

[Set Noa](https://tajo.io/set-noa/)

Send individual transactional emails using the `/v3/smtp/email` endpoint.

## Endpoint

```http
POST /v3/smtp/email
```

## Request Body

### Basic Email

```json
{
  "sender": {
    "name": "Your App",
    "email": "noreply@yourapp.com"
  },
  "to": [
    {
      "email": "user@example.com",
      "name": "John Doe"
    }
  ],
  "subject": "Welcome to our service!",
  "htmlContent": "<html><body><h1>Welcome!</h1><p>Thank you for signing up.</p></body></html>"
}
```

### Advanced Email

```json
{
  "sender": {
    "name": "Your App",
    "email": "noreply@yourapp.com"
  },
  "to": [
    {
      "email": "user@example.com",
      "name": "John Doe"
    }
  ],
  "cc": [
    {
      "email": "cc@example.com",
      "name": "CC User"
    }
  ],
  "bcc": [
    {
      "email": "bcc@example.com"
    }
  ],
  "subject": "Order Confirmation #{{order_id}}",
  "htmlContent": "<html><body><h1>Order Confirmed</h1><p>Your order {{order_id}} has been confirmed.</p></body></html>",
  "textContent": "Your order {{order_id}} has been confirmed.",
  "params": {
    "order_id": "12345"
  },
  "tags": ["transactional", "order-confirmation"],
  "headers": {
    "X-Custom-Header": "custom-value"
  }
}
```

## Code Examples

### JavaScript/Node.js

```javascript
const brevo = require('@getbrevo/brevo');

const apiInstance = new brevo.TransactionalEmailsApi();
apiInstance.setApiKey(brevo.TransactionalEmailsApiApiKeys.apiKey, process.env.BREVO_API_KEY);

const sendEmail = async () => {
  const sendSmtpEmail = new brevo.SendSmtpEmail();

  sendSmtpEmail.subject = "Welcome to our service!";
  sendSmtpEmail.htmlContent = "<html><body><h1>Welcome!</h1></body></html>";
  sendSmtpEmail.sender = { name: "Your App", email: "noreply@yourapp.com" };
  sendSmtpEmail.to = [{ email: "user@example.com", name: "John Doe" }];

  try {
    const result = await apiInstance.sendTransacEmail(sendSmtpEmail);
    console.log('Email sent:', result);
    return result;
  } catch (error) {
    console.error('Error sending email:', error);
    throw error;
  }
};
```

### Python

```python
import sib_api_v3_sdk
from sib_api_v3_sdk.rest import ApiException

configuration = sib_api_v3_sdk.Configuration()
configuration.api_key['api-key'] = 'YOUR_API_KEY'

api_instance = sib_api_v3_sdk.TransactionalEmailsApi(sib_api_v3_sdk.ApiClient(configuration))

send_smtp_email = sib_api_v3_sdk.SendSmtpEmail(
    to=[{"email": "user@example.com", "name": "John Doe"}],
    sender={"name": "Your App", "email": "noreply@yourapp.com"},
    subject="Welcome to our service!",
    html_content="<html><body><h1>Welcome!</h1></body></html>"
)

try:
    api_response = api_instance.send_transac_email(send_smtp_email)
    print(api_response)
except ApiException as e:
    print("Exception when calling TransactionalEmailsApi->send_transac_email: %s\n" % e)
```

### cURL

```bash
curl -X POST "https://api.brevo.com/v3/smtp/email" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -H "api-key: YOUR_API_KEY" \
  -d '{
    "sender": {
      "name": "Your App",
      "email": "noreply@yourapp.com"
    },
    "to": [
      {
        "email": "user@example.com",
        "name": "John Doe"
      }
    ],
    "subject": "Welcome to our service!",
    "htmlContent": "<html><body><h1>Welcome!</h1></body></html>"
  }'
```

## Response

### Success Response (201 Created)

```json
{
  "messageId": "<202301151234.12345@smtp-relay.mailin.fr>"
}
```

### Error Responses

**Invalid API Key (401)**

```json
{
  "code": "unauthorized",
  "message": "Invalid API key provided"
}
```

**Invalid Email Format (400)**

```json
{
  "code": "invalid_parameter",
  "message": "Invalid email format in 'to' field"
}
```

**Rate Limit Exceeded (429)**

```json
{
  "code": "too_many_requests",
  "message": "Rate limit exceeded"
}
```

## Parameters

### Required Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `sender` | object | Sender information |
| `to` | array | Array of recipient objects |
| `subject` | string | Email subject line |

### Optional Parameters

| Parameter | Type | Description |
| --- | --- | --- |
| `htmlContent` | string | HTML content of the email |
| `textContent` | string | Text content of the email |
| `cc` | array | CC recipients |
| `bcc` | array | BCC recipients |
| `replyTo` | object | Reply-to address |
| `attachments` | array | File attachments |
| `params` | object | Template parameters |
| `tags` | array | Email tags for tracking |
| `headers` | object | Custom headers |

## Template Variables

Use template variables in your subject and content:

```json
{
  "subject": "Welcome {{firstName}}!",
  "htmlContent": "<h1>Hello {{firstName}} {{lastName}}</h1>",
  "params": {
    "firstName": "John",
    "lastName": "Doe"
  }
}
```

## Attachments

Include file attachments:

```json
{
  "attachments": [
    {
      "content": "base64_encoded_content",
      "name": "invoice.pdf"
    },
    {
      "url": "https://example.com/document.pdf",
      "name": "document.pdf"
    }
  ]
}
```

## Best Practices

1. **Always include both HTML and text content** for better deliverability
2. **Use template variables** instead of concatenating content
3. **Include proper sender information** to avoid spam filters
4. **Add tags** for tracking and analytics
5. **Validate email addresses** before sending
6. **Handle errors gracefully** with retry logic

## Rate Limits

- **API rate limit**: on the general tier, which every plan gets, this endpoint allows 1,000 requests per second and 3,600,000 per hour. The advanced tier (Professional and Enterprise) allows 2,000 per second, and the extended tier (Enterprise) 6,000.
- **Sending volume**: how many emails you can send is set by your Brevo plan, separately from the rate limit.

See [Rate limits](https://tajo.io/docs/rate-limits/) and Brevo’s [rate limits page](https://developers.brevo.com/docs/api-limits).

## Tracking

Emails sent via this endpoint are automatically tracked for:

- Delivery status
- Open rates
- Click tracking
- Bounce handling

View detailed analytics in your Brevo dashboard under **Statistics** → **Transactional**.

## Related Endpoints

- Email Templates
- Attachments
- [Email Statistics](https://tajo.io/docs/analytics-reporting/)
