> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wazobiamail.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Sending email

> Send transactional email with the messages endpoint.

# Sending email

`POST /sending/messages` accepts a send with your API key as `X-API-Key`. The sender domain must already be verified (see [Domains](/docs/guides/domains)).

```bash theme={null}
curl -X POST https://app.wazobiamail.com/api/v1/sending/messages \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "envelopeSender": "hello@mail.example.com",
    "to": ["customer@example.com"],
    "content": {
      "from": "Example Store <hello@mail.example.com>",
      "subject": "Your receipt",
      "htmlBody": "<p>Thanks for your order.</p>"
    }
  }'
```

## Request rules

* `envelopeSender` is the sender email address on your verified domain.
* `to`, `cc` and `bcc` are lists of email addresses. Supply at least one recipient in total, with no more than 10,000 per request.
* `content.from` is the visible sender, optionally with a display name.
* `content.subject` is required. Put your message in `content.htmlBody`, `content.textBody`, or both.
* `content.replyTo` optionally directs replies to another address.
* For attachments, use the separate flow in [Attachments](/docs/guides/attachments).

## Responses

* `200` with `success: true` — accepted for sending. The sending result is in `data.result`.
* `400` — invalid recipient or message content.
* `401` — missing, invalid or revoked API key.
* `403` — domain or sending permission unavailable for this account.
* `429` — sending allowance or rate limit exceeded.

## Check what happened next

Acceptance is separate from delivery. Review [delivery activity](/docs/guides/tracking) in your account and check an inbox you control before connecting a live signup or checkout flow. Sending is subject to your account plan and configured provider limits.

See [integration examples](/docs/guides/integrations) for cURL, JavaScript, TypeScript, PHP, Go, Rust, Python, C# and Java.

## Send normal text without HTML

Use `textBody` and leave out `htmlBody`. Newlines are preserved. Tags such as `<b>` remain literal text.

```bash theme={null}
curl -X POST https://app.wazobiamail.com/api/v1/sending/messages \
  -H "X-API-Key: $WAZOBIA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "envelopeSender": "hello@mail.example.com",
    "to": ["customer@example.com"],
    "content": {
      "from": "Example Store <hello@mail.example.com>",
      "replyTo": "noreply@mail.example.com",
      "subject": "Your order is ready",
      "textBody": "Hello!\n\nYour order is ready for collection.\nThank you for shopping with us."
    }
  }'
```

## Offer both plain text and HTML

Provide both bodies in the same `content` object so the receiving email client can choose its preferred format. Write equivalent content in each version. The API does not generate the plain-text version for you.

```json theme={null}
{
  "envelopeSender": "hello@mail.example.com",
  "to": ["customer@example.com"],
  "content": {
    "from": "Example Store <hello@mail.example.com>",
    "replyTo": "noreply@mail.example.com",
    "subject": "Your order is ready",
    "textBody": "Hello! Your order is ready for collection.",
    "htmlBody": "<p>Hello! Your order is <strong>ready for collection</strong>.</p>"
  }
}
```

To include PDFs, images or other files, use [the attachment examples](/docs/guides/attachments) rather than adding local paths to this JSON payload.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.