---
title: "Draft a reply with AI"
method: POST
path: "/v1/messages/{id}/draft-reply"
tags: ["Messages"]
---

# Draft a reply with AI

`POST /v1/messages/{id}/draft-reply`

## Request

- Base URL: `https://api.agentboxd.com`
- URL: `https://api.agentboxd.com/v1/messages/{id}/draft-reply`
- Auth: HTTP bearer

`{ instructions?, save? }` (instructions up to 2,000 characters). Returns `{ text, citations: [{ knowledge_id, title }], model }`. Never sends. With `save: true` the reply is also stored as a [draft](https://agentboxd.com/docs/drafts) and returned in `draft` (needs `drafts:write` too). Needs AI processing `full`; see [Reply drafts](https://agentboxd.com/docs/reply-drafts).

Permission: `messages:send`.

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `instructions` string
  - `save` boolean

## Response `200`

OK

- object

## Other responses

- `4XX`: Error
- `5XX`: Error

---

[API](https://skmtc.dev/agentboxd/apis/agentboxd-api.md) · [All operations](https://skmtc.dev/agentboxd/apis/agentboxd-api/llms.txt) · [OpenAPI document](https://skmtc.dev/agentboxd/apis/agentboxd-api/revisions/ee7b079f0e97?raw)
