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

# Drafts API: Save and Send Agent Emails for Human Review

> Create, list, and delete draft emails so agents can stage messages for human review before sending from the Agent Loadout dashboard.

Drafts let an agent compose a message and save it without sending. A team member can then review and send it directly from the dashboard. This is especially useful for supervised workflows where the agent handles triage and drafting, but a human approves anything that touches billing, account access, or sensitive topics. Saved drafts retain their uploaded file attachments; unused uploads that are not attached to any draft expire automatically after 24 hours.

***

## List drafts

Returns cursor-paginated saved drafts for the specified inbox.

**`GET /api/v1/inboxes/:id/drafts`**

Requires: `email:read`

### Query parameters

**limit** `integer`

Number of drafts to return. Range: 1–100. Defaults to 25. Large drafts can reduce the number returned per page.

**cursor** `string`

Opaque pagination cursor returned as `next_cursor` in the previous response.

```bash title="List saved drafts" theme={null}
curl -s "https://agent-loadout.com/api/v1/inboxes/<INBOX_ID>/drafts?limit=20" \
  -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN"
```

***

## Create a draft

Saves a draft without sending it. Supply `id` to replace an existing draft, or omit it to create one. Attach existing upload IDs for file attachments. Drafts are standalone messages and do not retain a link to an original conversation. Recipients, subject, and body can be empty while drafting. Replacing a draft resets omitted fields, so send all fields you want to retain.

**`POST /api/v1/inboxes/:id/drafts`**

Requires: `email:send`

```bash title="Save a draft message" theme={null}
curl -s -X POST https://agent-loadout.com/api/v1/inboxes/<INBOX_ID>/drafts \
  -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"to":["customer@example.com"],"subject":"Re: Your question","text":"Draft reply..."}'
```

### Request parameters

**id** `string`

Existing draft ID to replace. Omit to create a new draft.

**to** `string[]`

Recipient addresses for the draft. May be empty until sending. Up to 50 recipients across `to`, `cc`, and `bcc`. Accepts plain addresses or RFC 5322 `"Name <addr>"` format.

**subject** `string`

Subject line of the draft message.

**text** `string`

Optional plain-text draft body. You may save an empty draft and add content later.

**html** `string`

HTML draft body displayed in email clients that support it.

**attachment\_ids** `string[]`

IDs of previously uploaded files to attach to this draft. Upload files first via `POST /api/v1/inboxes/:id/uploads`. Maximum 10 attachments and 10 MB total.

**expected\_updated\_at** `string`

With `id`: the draft's `updated_at` as you last read it. If someone saved the draft since, the save is refused with `409` (`details.reason` `draft_changed`) and `details.draft` holds the current version, so two editors never overwrite each other silently. Omit it to replace the draft whatever its version.

> [!NOTE]
>
> Sending a saved draft from the dashboard or the send endpoint starts a new conversation, even if the subject begins with `Re:`. To preserve reply headers after a human reviews the text, open the original message and use **Reply**, or call `POST /api/v1/messages/:id/reply` with the approved text. That separate reply does not remove the saved draft; delete it when it is no longer needed.

***

## Delete a draft

Permanently removes a saved draft. Attached files are released and may expire if not referenced elsewhere.

**`DELETE /api/v1/drafts/:id`**

Requires: `email:send`

```bash title="Delete a draft" theme={null}
curl -s -X DELETE https://agent-loadout.com/api/v1/drafts/<DRAFT_ID> \
  -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN"
```

***

## Sending a draft

To promote a draft to a sent message, pass its `draft_id` in the body of the send endpoint. The draft is removed atomically when the message is queued, even if the send is deduplicated by an `idempotency_key`.

```bash title="Send a saved draft" theme={null}
curl -s -X POST https://agent-loadout.com/api/v1/inboxes/<INBOX_ID>/messages \
  -H "Authorization: Bearer $AGENT_LOADOUT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": ["customer@example.com"],
    "subject": "Re: Your question",
    "text": "Draft reply...",
    "draft_id": "<DRAFT_ID>",
    "idempotency_key": "reply-draft-<DRAFT_ID>"
  }'
```

> [!NOTE]
>
> Sending requires the `email:send` scope. On the Free Sandbox, sends are limited to verified recipients (25 per month, 5 per day). A paid plan is required for production support workflows.

***

## Attachment lifecycle

> [card] Uploads (unsaved)
>
> Files uploaded via `POST /api/v1/inboxes/:id/uploads` but not yet attached to a draft or message expire after **24 hours**.

> [card] Draft attachments
>
> Files referenced in a saved draft are retained as long as the draft exists. Deleting the draft releases the files.


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