---
title: "Rewrite a queued draft"
method: POST
path: "/api/replies/rewrite"
tags: ["Review queue"]
---

# Rewrite a queued draft

`POST /api/replies/rewrite`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/replies/rewrite`
- Auth: API key in cookie `luca.session_token`

Runs one drafter call that rewrites the queued draft per the instruction and returns the new text. It spends AI credits, and it changes nothing: the review queue row keeps its body until the coach applies the proposal.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Request body

- ReplyRewriteRequest
  - `reviewItemId` string, uuid, required
  - `instruction` string, required

## Response `200`

ok

- ReplyRewriteResponse
  - `reviewItemId` string, required
  - `leadId` string, required
  - `originalBody` string, required
  - `proposedBody` string, required
  - `voiceMatch` number, required
  - `criticFlags` string[], required

## Other responses

- `401`: unauthorized
- `404`: not found
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

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