Set how an agent composes and sends email replies.
Email properties control how an agent renders and sends an outbound email — the subject, body, HTML wrapper, signature, footer, and the rules that decide when to reply or close a thread. They live in the agent’s per-channel channel_properties under the email key and do not change what the agent says, only how the reply is delivered.To steer what the agent says on email (instructions, greeting, tool budget), use channel_overrides instead — see Per-channel configuration.
The renderer reuses the real delivery path, so the order is fixed:
1. body_template -> body (Jinja, with {{agent_response}})2. + signature (if set)3. + "Reply STOP" footer (if include_unsubscribe_footer)4. + quoted history (if quote_history)5. template_wrapper wraps the HTML body via {{body}}6. body_format selects which MIME parts ship
The Markdown body is converted to HTML automatically. signature is also rendered from Markdown.
subject_template only applies once a thread exists — that is, when there is a prior inbound message to reply to. For the first message of a brand-new thread, the original subject is kept as-is, or default_subject is used for an agent-initiated send with no subject.
cc_reply_policy, require_dmarc_pass, and auto_close_on_conclusion feed the reply-eligibility decision on every inbound message:
Setting
Effect
require_dmarc_pass: true
Inbound mail whose DMARC result is not pass is skipped — no reply.
cc_reply_policy: never
When the agent is only CC’d (not in To), skip the reply.
cc_reply_policy: always
When the agent is only CC’d, always reply.
cc_reply_policy: conditional
When the agent is only CC’d, defer to the reply gate, which decides whether the agent is addressed or needed.
auto_close_on_conclusion: true
If the gate judges the conversation complete, close it proactively.
When the agent is a direct To recipient, it replies regardless of cc_reply_policy. Any uncertainty defaults to replying and not closing. For more on threading, recipients, and gating, see Threading and replies.
POST /core/messaging/preview runs the real renderer against a sample agent response and returns exactly what would be delivered — subject, HTML, and plaintext — without sending anything. The agent editor uses this for the live preview.Requires either the agents:read or agents:manage scope.
curl -X POST https://api.anyreach.ai/core/messaging/preview \ -H "Authorization: Bearer <token>" \ -H "X-Anyreach-Org: <organization_id>" \ -H "Content-Type: application/json" \ -d '{ "channel": "email", "properties": { "signature": "Best,\nThe Acme Team", "include_unsubscribe_footer": true, "body_format": "multipart" }, "sample_agent_response": "Yes — we ship to Canada in 3-5 business days.", "context": { "subject": "Do you ship to Canada?" } }'
{ "subject": "Re: Do you ship to Canada?", "html": "<p>Yes — we ship to Canada in 3-5 business days.</p>...", "plaintext": "Yes — we ship to Canada in 3-5 business days...."}
For text and sms channels, subject and html are null and only plaintext is populated.
Per-channel configuration
Steer instructions, greeting, and tool budget per channel.