AgentEmail documentation
Mailbox API reference.
Base URL: https://agentemail.cc/v3. All endpoints require Authorization: Bearer YOUR_API_KEY. Use your mailbox read key, not a Guth sign-in token. These endpoints are for server-side agents: browser Origin and cookie headers are rejected.
| Method | Path | Result |
|---|---|---|
| GET | /messages | Mailbox message metadata and next cursor. |
| GET | /messages/{messageId} | Parsed plain-text message preview. |
| GET | /messages/{messageId}/raw | RFC822 download as message/rfc822. |
Pagination
limit defaults to 50 and accepts 1–100. Pass nextCursor from the previous response as cursor. Messages are ordered newest first, with message ID as the stable tie-breaker. A cursor is a position, not permission to read another mailbox.
Message metadata
{
"messages": [],
"nextCursor": null
}Each listed message has message_id, recipient, envelope_from, raw_size, state and received_at (Unix milliseconds). A stored message’s quarantined state means it is untrusted email, not a completed agent task.
Private responses
Responses use Cache-Control: no-store. HTML email and attachment bytes are not included in the parsed preview. Treat sender claims and message content as unverified.