Inbound and inboxes
Receive mail on your domain, and work it as threads, replies and drafts.
Receive mail
- Create the inbound resources with
setup-aws.mjs --inbound --inbound-domain inbound.example.com. See AWS setup. - Add the domain with
capabilities.receivingset toenabled, and publish the MX record the API returns:10 inbound-smtp.us-east-1.amazonaws.com. - Make sure
INBOUND_QUEUE_URLis set. The poller runs from/internal/inbound/poll.
Mail to a domain that does not have receiving enabled is dropped. List what arrived with GET /emails/receiving, and fetch attachments from /emails/receiving/{email_id}/attachments. Each message also fires email.received.
Inboxes
An inbox is an address on a receiving domain with its own threads.
POST /inboxescreates one. Address it by ID or by its email address in later calls.- Threads:
/inboxes/{inbox_id}/threads, with search at/threads/search. - Reply or forward a message with
POST .../emails/{email_id}/replyand.../forward. - Drafts: create, edit and send under
/inboxes/{inbox_id}/drafts. - Labels organize threads.
A sending_access key can call only reply, forward, create draft and send draft on inboxes. Every other inbox route needs a full-access key.
Agent replies
PATCH /inboxes/{id}/agent stores instructions and tone for drafting replies. Drafting uses Claude and needs ANTHROPIC_API_KEY on the server (ANTHROPIC_MODEL is optional). Without a key, the settings are saved but drafting returns 501 and the inbound hook does nothing.