# Send a message

**`POST https://myagentmail.com/v1/inboxes/{id}/send`**

Group: Messages
Operation ID: `sendMessage`

Sends from this inbox. The `From` header is derived from the inbox's primary alias. Pass `verified: true` when you've validated the recipient domain out-of-band (e.g. via verify-email); otherwise, sends to an address that has never replied to this inbox are rejected as a deliverability safeguard.


## Path parameters

- `id` (string, required) — Inbox UUID

## Request body

Content-Type: `application/json`

```json
{
  "subject": "string",
  "plainBody": "string",
  "htmlBody": "string",
  "replyTo": "agent@example.com",
  "verified": false
}
```

## Responses

### 200 — Sent

```json
{
  "id": "00000000-0000-0000-0000-000000000000",
  "threadId": "00000000-0000-0000-0000-000000000000",
  "status": "sent",
  "messageId": "string"
}
```

### 403 — Inbox paused or plan limit reached

### 502 — SMTP relay error

## Code samples

### TypeScript

```typescript
import { MyAgentMail } from "myagentmail";

const client = new MyAgentMail({ apiKey: process.env.MYAGENTMAIL_API_KEY! });

// POST /v1/inboxes/{id}/send
const result = await client.request("post", "/v1/inboxes/{id}/send", { params: { id: "00000000-0000-0000-0000-000000000000" } }, { body: {
  "subject": "string",
  "plainBody": "string",
  "htmlBody": "string",
  "replyTo": "agent@example.com",
  "verified": false
} });
```

### curl

```bash
curl -X POST 'https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/send' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "subject": "string",
  "plainBody": "string",
  "htmlBody": "string",
  "replyTo": "agent@example.com",
  "verified": false
}'
```

### Python

```python
import os, requests

r = requests.post(
    "https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/send",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
    json={
        "subject": "string",
        "plainBody": "string",
        "htmlBody": "string",
        "replyTo": "agent@example.com",
        "verified": false
    },
)
r.raise_for_status()
print(r.json())
```
