Docs
API · emails

Reply in-thread

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.

01 Path parameters

idstringRequired
The id of the message you're replying to (typically an inbound message).

02 Body parameters

The entire body is optional; pass only what you want to override.

htmlstringOptional
The HTML reply body. Provide html, text, or both.
textstringOptional
The plain-text reply body.
subjectstringOptional
Override the subject. Defaults to the parent's subject with a Re: prefix.
fromobjectOptional
Override the sender, { email, name? }. Defaults to the parent's inbox address so threading stays intact.

03 Headers

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

04 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."
  }'

05 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 conversationTo 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.