Reading your agent's inbox

Inbound mail arrives parsed: sender, subject, body, headers, attachments. No MIME handling on your side.

Mails.ai — Reading your agent's inbox

Anything sent to [email protected] lands in that agent's inbox. We parse it, strip the quoted history so you get the actual new text, check SPF and DKIM, and store it against the right thread.

A thread showing the agent's send and the customer's reply together

Three ways to read it

  • Webhook — the event is pushed to your endpoint, HMAC-signed. This is the one to build on.

  • APIGET /v1/messages/received and GET /v1/messages/received/{id}, plus GET /v1/messages/{id}/raw if you genuinely want the original MIME.

  • Dashboard — the agent's inbox and the thread view, for when a human needs to look.

The reply text, not the whole quote chain

extracted_text is the new message with the quoted history removed. body_text is everything. Most agent code wants extracted_text — feeding the whole quote chain to a model is how you get replies that answer a question from three emails ago.

Authentication results

spf_pass and dkim_pass come back on every inbound. Mail that fails both is not blocked, it is flagged — you decide what your agent does with an unauthenticated sender, and there is a separate message.received.unauthenticated event if you want to treat it differently.

Open your threads
Did this answer your question?
😞
😐
😁