Reading your agent's inbox

Inbound mail arrives parsed: sender, subject, body and its authentication results. No MIME handling on your side.

Mails.ai — Reading your agent's inbox

Mail sent to [email protected] lands in the hello agent's inbox. That address is the Reply-To on everything the agent sends, so replies come back there too. We parse the mail, strip the quoted history so you get the actual new text, check its DKIM signature, and store it against the right thread.

The Threads inbox: each conversation with its subject, the other person's address, its labels, agent, message count and last activity

Three ways to read it

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

  • API — GET /v1/messages/received and GET /v1/messages/received/{id}. GET /v1/messages/{id}/raw returns the original email as it arrived, attachments included, and GET /v1/messages/received/{id}/attachments lists its attachments to download one by one. Mail we did not keep whole, such as mail from before 4 October 2026 or past your plan's daily storage for original emails, comes back as an .eml rebuilt from the stored fields.

  • 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 the whole text body, up to 100,000 characters, from GET /v1/messages/received/{id}; events carry its first 500 characters as body_text_excerpt. 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

dkim_pass comes back on every inbound event as true or false, or null when there was no verdict. spf_pass is there too but reads null, because SPF needs the address of the server that connected and we do not see it. Mail from a domain that promises signed mail, with a DMARC policy of quarantine or reject, and no matching DKIM signature arrives as message.received.unauthenticated, with auth_failed: true, instead of the usual event. It is still delivered, not blocked: you decide what your agent does with it.

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