Skip to main content
The email channel lets an agent receive and reply to real email. Inbound mail is parsed, routed to an agent by recipient address, threaded to a conversation using RFC 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:
ObjectWhat it is
Email domainA sending/receiving domain registered with the provider. Either the shared default agents.anyreach.ai or a custom domain you verify with DNS.
Email addressA specific address (for example support@yourco.com) that routes inbound mail to one agent version.
Agent email configPer-channel email properties on the agent version that control how replies are rendered (subject, signature, format, CC policy, footers).
Unsubscribe ledgerAn org-wide opt-out list, keyed by channel and address, that suppresses outbound sends to contacts who opted out.

How it flows

Inbound email ─▶ Resend webhook ─▶ route by recipient address ─▶ thread by Message-ID


                                                         agent answers as a reply


                                  Resend send ─▶ per-message delivery status
1

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.
2

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.
3

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.
4

The agent answers inbound email

Incoming mail is matched to its conversation by In-Reply-To / References headers, the agent generates a reply, and the send is tracked through to delivery.

Routing

Inbound mail is routed by the address it was delivered to. Anyreach checks Delivered-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 RFC Message-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 a channel, 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:
StateMeaning
queuedAccepted by the provider, not yet sent.
sentHanded off to the recipient’s mail server.
deliveredAccepted by the recipient’s mail server.
openedThe recipient opened the message.
clickedThe recipient clicked a link.
bouncedThe message bounced.
complaintThe recipient marked it as spam.
failedThe send failed.
queuedsentdeliveredopenedclicked 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.