---
title: Messages
description: Send and receive emails through the API.
surface: agent
---

## Sending a Message

```bash
POST /v0/inboxes/{inbox_id}/messages/send
{
  "to": ["recipient@example.com"],
  "subject": "Hello",
  "text": "Plain text content",
  "html": "<p>HTML content</p>"
}
```

## Message Fields

| Field | Type | Description |
|-------|------|-------------|
| `id` | string | Unique message ID |
| `inbox_id` | string | Parent inbox (email address) |
| `thread_id` | string | Thread grouping ID |
| `from` | string | Sender address |
| `to` | string[] | Recipient addresses |
| `cc` | string[] | CC addresses |
| `bcc` | string[] | BCC addresses |
| `subject` | string | Email subject |
| `text` | string | Plain text body |
| `html` | string | HTML body |
| `direction` | "inbound" \| "outbound" | Message direction |

## Replies

```bash
POST /v0/inboxes/{inbox_id}/messages/{message_id}/reply-all
{
  "text": "Thanks for your message!"
}
```

Threading headers (`In-Reply-To`, `References`) are automatically injected.
