---
title: "Reply to a message"
method: POST
path: "/api/emails/{address}/messages/{id}/reply"
tags: ["Email"]
---

# Reply to a message

`POST /api/emails/{address}/messages/{id}/reply`

## Request

- Base URL: `https://domani.run`
- URL: `https://domani.run/api/emails/{address}/messages/{id}/reply`
- Auth: HTTP bearer

Reply to a message in a mailbox identified by its full email address. Threading headers are auto-populated, and the original is quoted under the reply as mail clients do (attribution line in the account's language, `> ` lines in text, a `gmail_quote` block in HTML) unless `quote` is false. Collaborative clients should pass the compose lease, observed reply_version, and a stable idempotency key; the server atomically rejects a stale/double reply immediately before sending.

## Path parameters

- `address` string, required
- `id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object
  - `text` string: Plain text reply body
  - `html` string: HTML reply body
  - `cc` union: Additional CC recipient(s)
    - string
    - string[]
  - `all` boolean: Reply-all: auto-populate CC from original To/CC
  - `quote` boolean: Quote the original under the reply; false sends only the text or html given
  - `idempotency_key` string: Body compatibility form of Idempotency-Key
  - `coordination` object
    - `thread_key` string: Canonical key returned by the message or work queue
    - `client_id` string, required
    - `lease_id` string, required
    - `expected_reply_version` integer, required

## Response `200`

Reply sent

- object
  - `id` string
  - `message_id` string
  - `from` string
  - `to` string
  - `status` string
  - `reply_version` integer: Reserved generation for a guarded reply

## Other responses

- `400`: Missing body (provide text or html)
- `404`: Mailbox or message not found
- `409`: Compose lease missing/expired, or another reply advanced the observed reply_version. The error `current` field contains the coordination snapshot.

---

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