Skip to content
Docs
Open Escouade
Documentation contents

Docs › Mail › Tools

reply_to_thread

View as .md

Reply in a thread.

Replies in an existing thread, to the thread’s correspondent: subject “Re: …” and correct In-Reply-To / References headers, so the reply shows in the same conversation for the recipient. Also used to follow up: a reply in a thread is not subject to the duplicate rule, but remains subject to blocks, quotas, the window and human approval. As soon as the correspondent has written in the thread, it is a conversation: the reply leaves without waiting for the window and without an unsubscribe footer (the one-click link stays in its headers); it still counts towards today’s quota, respects the spacing between two sends and remains subject to blocks and human approval.

Access

  • Key: an Escouade Mail key with send.
  • Space: a verified space.
  • Changes nothing: no, it acts.
  • Safe to replay: use an idempotency_key where the tool offers one.

Parameters

ParameterTypeRequiredDescription
thread_idstringyesThe thread (thr_…, see list_threads).
subjectstringnoSubject, optional: “Re:” + the thread’s subject by default.
cclist of stringnoAddresses in copy: only if the correspondent has already written in the thread, to someone who has also written in it or to an address of the space.
from_addressstringnoThe inbox’s main address or an allowed alias (list_inboxes).
textstringyesPlain text of the message (required). Write {{unsubscribe_url}} to place the unsubscribe link yourself; otherwise Escouade Mail adds a notice in the footer, as long as the correspondent has not written in the thread. No other placeholder in double braces is accepted: replace them beforehand.
htmlstringnoOptional HTML version, same content as text.
reply_tostringnoReply-to address, if it differs from the inbox.
metadataobjectnoThe agent’s free data (8,000 characters at most), returned as it is in reads.
requires_approvalbooleannotrue: the message stays a draft until a human approves it (approve_message). Some spaces always require it.
send_afterstringnoNot before this date (ISO 8601, or Paris time without a time zone). The window (except for a reply in a conversation) and the quotas apply afterwards.
idempotency_keystringnoUnique key for this send (1 to 255 characters). Replaying the same key with the same content returns the message already created; with different content, an explicit refusal. Recommended for every retry.

Call it

Terminal
curl -s https://api.subagent.fr/v1/reply_to_thread \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer sak_…' \
  -d '{"thread_id": "…", "text": "…"}'

The full page in French, with the response fields and every refusal the tool can return: /mail/docs/reference/reply_to_thread.