# Email API

Send 1-1 and bulk emails using your CRM token.

## Authentication

```
Authorization: Bearer YOUR_CRM_TOKEN
```

## Send 1-1 Email

**POST** `https://campaigns.crm-messaging.cloud/api/email/send`

```json
{
  "fromEmail": "you@yourdomain.com",
  "toEmail": "recipient@example.com",
  "subject": "Hello",
  "content": "<p>Hi there</p>",
  "preheader": "Optional preview text"
}
```

## Send Bulk Email

**POST** `https://campaigns.crm-messaging.cloud/api/email/send-bulk`

```json
{
  "fromEmail": "you@yourdomain.com",
  "subject": "Newsletter",
  "content": "<p>Hello everyone</p>",
  "recipients": ["a@example.com", "b@example.com"],
  "scheduleType": "now"
}
```

Use `groupIds` instead of `recipients` to target existing contact groups.
