# Send a draft

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

Group: Drafts
Operation ID: `sendDraft`

Sends the current draft contents and deletes the draft atomically. If the draft has `replyToMessageId`, the sent message is threaded as a reply.

## Path parameters

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

## Responses

### 200 — Sent

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

## Code samples

### TypeScript

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

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

// POST /v1/inboxes/{id}/drafts/{did}/send
const result = await client.request("post", "/v1/inboxes/{id}/drafts/{did}/send", { params: { id: "00000000-0000-0000-0000-000000000000", did: "00000000-0000-0000-0000-000000000000" } });
```

### curl

```bash
curl -X POST 'https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/drafts/00000000-0000-0000-0000-000000000000/send' \
  -H 'X-API-Key: $MYAGENTMAIL_API_KEY'
```

### Python

```python
import os, requests

r = requests.post(
    "https://myagentmail.com/v1/inboxes/00000000-0000-0000-0000-000000000000/drafts/00000000-0000-0000-0000-000000000000/send",
    headers={"X-API-Key": os.environ["MYAGENTMAIL_API_KEY"]},
)
r.raise_for_status()
print(r.json())
```
