Message-ID headers, and answered as a reply — with per-message delivery status and unsubscribe compliance handled for you. Email is sent and received through Resend.
The model
Four objects make up the email layer:| Object | What it is |
|---|---|
| Email domain | A sending/receiving domain registered with the provider. Either the shared default agents.anyreach.ai or a custom domain you verify with DNS. |
| Email address | A specific address (for example support@yourco.com) that routes inbound mail to one agent version. |
| Agent email config | Per-channel email properties on the agent version that control how replies are rendered (subject, signature, format, CC policy, footers). |
| Unsubscribe ledger | An org-wide opt-out list, keyed by channel and address, that suppresses outbound sends to contacts who opted out. |
How it flows
Verify a domain (or use the default)
Every default address is
<name>@agents.anyreach.ai, which works with no setup. To send and receive on your own domain, register it and verify the DNS records the provider returns. See Connecting a domain.Create an email address
Create an address on a verified domain and point its
inbound_agent_version_id at the agent version that should answer it. An address can route to exactly one agent. See Email addresses.Configure the agent's email behavior
Set the
email block in the agent version’s per-channel properties to control reply subject, body format, signature, CC policy, and footers. See Configuring an email agent.Routing
Inbound mail is routed by the address it was delivered to. Anyreach checksDelivered-To first, then the visible To and Cc recipients, and routes to the first address that resolves to an enabled agent. If the matched address is only in Cc (not To), the agent treats it as a CC’d participant rather than the primary recipient.
A reply is sent only when an address matches an agent. Auto-generated mail — anything carrying List-Id, List-Unsubscribe, or X-Auto-Response-Suppress — is detected and not answered, so the agent never replies to mailing lists or autoresponders.
Threading
Replies stay in the same email thread. Each inbound message is matched to its existing conversation by the RFCMessage-ID values in its In-Reply-To and References headers; when a match is found, the message joins that conversation, and the outbound reply carries the correct threading headers, subject, and participant list so it lands in the recipient’s existing thread.
Suppression and compliance
Anyreach keeps a single org-wide unsubscribe ledger. Each row records achannel, an address, and a reason, with one entry per (organization_id, channel, address). Because the ledger is keyed by channel, opt-outs are tracked across channels rather than per agent. Outbound email replies append an unsubscribe footer by default (include_unsubscribe_footer), and removing a ledger row resubscribes that contact.
Manage opt-outs through the /core/unsubscribes endpoints (scopes unsubscribes:read and unsubscribes:manage). See Unsubscribes and compliance.
Delivery status
Every outbound message has a normalized delivery state, independent of the provider’s own event vocabulary. Resend webhook events map onto a fixed ladder:| State | Meaning |
|---|---|
queued | Accepted by the provider, not yet sent. |
sent | Handed off to the recipient’s mail server. |
delivered | Accepted by the recipient’s mail server. |
opened | The recipient opened the message. |
clicked | The recipient clicked a link. |
bounced | The message bounced. |
complaint | The recipient marked it as spam. |
failed | The send failed. |
queued → sent → delivered → opened → clicked advances monotonically; bounced, complaint, and failed are terminal. See Delivery status.
Next steps
Connect a domain
Register a custom sending/receiving domain and verify its DNS records.
Email addresses
Create addresses and route each one to an agent version.
Configure an email agent
Set reply subject, body format, signature, CC policy, and footers.
Threading and replies
How inbound mail is matched to a conversation by Message-ID.
Unsubscribes and compliance
Manage the org-wide opt-out ledger and unsubscribe footers.
Delivery status
Track each message from queued through delivered, opened, or bounced.

