# Reply drafts

Source: https://agentboxd.com/docs/reply-drafts

> Ask for a draft answer to a message, built from the thread, the contact and your knowledge. It is never sent on its own.

`POST /v1/messages/:id/draft-reply` returns a suggested reply. Your agent or a person reviews it, changes what needs changing, and sends it with the normal reply call. Agentboxd never sends a draft by itself.

POST /v1/messages/:id/draft-reply:

```bash
curl -s -X POST https://api.agentboxd.com/v1/messages/$MESSAGE_ID/draft-reply   -H "Authorization: Bearer $AGENTBOXD_API_KEY"   -H "Content-Type: application/json"   -d '{"instructions":"Say it shipped Monday; offer the tracking link."}'

# 200 {"text":"Hi Priya, …","citations":[{"knowledge_id":"…","title":"Shipping times"}],"model":"deepseek-flash"}
```

draft.ts:

```ts
const draft = await mr.messages.draftReply(msg.id, { instructions: 'Keep it short.' });
console.log(draft.text, draft.citations.map((c) => c.title));

// Review, then send it in the thread.
await mr.messages.reply(msg.inbox_id, msg.id, { text: draft.text });
```

## What the draft is built from

- The thread: its latest 10 messages, as `extracted_text`.
- The contact: name, notes and metadata.
- Your knowledge: the top 5 matches for the latest inbound message in that inbox (workspace-wide documents included).
- Your `instructions`, if you send any (up to 2,000 characters).

Drafts are written by DeepSeek, the model set on the server (`deepseek-flash` by default; the response names it in `model`). Email content is marked as untrusted data in the prompt, so instructions hidden in an email are not meant to steer the draft. Treat that as a guardrail, not a guarantee, and read what comes back.

## Turning it on

Drafts need the workspace’s [AI processing](https://agentboxd.com/docs/ai-processing) set to `full`. Otherwise the call answers `403 ai_disabled`. If the model doesn’t answer, you get `503 llm_unavailable` and nothing is sent.

From an MCP client, use `draft_reply` and then `reply_to_email`. In the dashboard, the reply box has a **Draft reply** button that fills the box and lists the knowledge it used, and **Save as draft** to leave it for someone to approve.

## Save it for review

Pass `save: true` and the generated reply is also stored as a [draft](https://agentboxd.com/docs/drafts) replying to that message (`source: "ai"`), returned in `draft`. A person can then edit, approve, schedule or cancel it; nothing is sent until then. Saving needs the `drafts:write` permission and costs nothing extra.

> **Careful:** Everything listed above, including your instructions, is sent to DeepSeek (China) for each draft. See [Privacy and data flow](https://agentboxd.com/privacy#ai-processing).
