Skip to main content
Reply to a message in one call. Drin threads it for you: From defaults to the parent’s inbox, To to the parent’s sender, the subject gets a Re: prefix, and the In-Reply-To / References headers are set. POST /v1/emails/{id}/reply Reply to an inbound message and the new message lands in the same thread on the recipient’s side. The body is optional — every field below has a sensible default derived from the parent message. At minimum, supply html or text.

Path parameters

id
string
required
The id of the message you’re replying to (typically an inbound message).

Body parameters

The entire body is optional; pass only what you want to override.
html
string
The HTML reply body. Provide html, text, or both.
text
string
The plain-text reply body.
subject
string
Override the subject. Defaults to the parent’s subject with a Re: prefix.
from
object
Override the sender, { email, name? }. Defaults to the parent’s inbox address so threading stays intact.

Headers

Idempotency-Key
header
Make the reply safe to retry — the same key replays the original result for 24 hours. See Idempotency & retries.

Request

curl https://api.drin.run/v1/emails/msg_01HZX9K3T2QF7P0M4N8B6C5D/reply \
  -H "Authorization: Bearer $DRIN_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "html": "<p>Thanks for reaching out — we are on it.</p>",
    "text": "Thanks for reaching out — we are on it."
  }'

Response

202 Accepted — the reply was queued. The response is the same shape as a send: the new message’s id and status.
202 Accepted
{
  "id": "msg_01HZXB7Q4R2KD9F0M1N3P5T8",
  "status": "queued"
}
See the whole conversation. To read both sides of a thread joined together, use GET /v1/threads/{id}. The guide on replying in-thread walks the full receive-then-reply loop.