---
title: "Approve and send a draft"
method: POST
path: "/agents/runs/{id}/approve"
tags: ["agents"]
---

# Approve and send a draft

`POST /agents/runs/{id}/approve`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/agents/runs/{id}/approve`
- Auth: HTTP bearer

pending → approved → sent through the reply pipeline → sent; idempotency key agent-run:{runId}. body.text overrides the draft text.

## Path parameters

- `id` string, required: run ID

## Request body

- object
  - `text` string: Override the draft body

## Response `200`

Sent

- object
  - `success` boolean, required
  - `run_id` string, required
  - `reply_id` string
  - `sent_message_id` string, nullable

## Other responses

- `400`: Invalid parameters or no draft
- `401`: Missing or invalid API key
- `404`: Run not found
- `409`: Not awaiting approval

---

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