email:send scope.
List messages
Returns cursor-paginated message summaries for an inbox, newest first. Usecursor from the previous response to fetch the next page.
GET /api/v1/inboxes/:id/messages
Requires: email:read
Query parameters
ISO 8601 timestamp, for example
2026-10-01T09:00:00Z. Without a time zone it is read as UTC; a bare date means its midnight. Returns only messages received or sent after this time.List the newest 20 messages
Read a message
Returns the full message including sanitized HTML, plain text, attachment metadata, and the mail screening verdict. Always checkscreening.verdict before acting on message content.
GET /api/v1/messages/:id
Requires: email:read
Read a single message
Response fields
The new part of
text: the quoted earlier messages (“On … wrote:”, Outlook’s “From: … Sent: …” block, >-quoted lines) and a trailing signature or “Sent from my iPhone” line are removed. When the sender answered between the quoted lines, those answers are kept and only a trailing quote is removed. null when there is no plain-text body or nothing is left. Fall back to text when the answer may sit inside the quote.true when text or html was longer than 1,000,000 characters and arrives cut. A mailbox export carries complete bodies.Set when a machine sent the message:
auto_reply for out-of-office and other automatic replies (an Auto-Submitted header, X-Autoreply, or an automatic-reply subject), delivery_status for bounces and read receipts, bulk for list and newsletter mail (List-Id, List-Unsubscribe, Precedence: bulk). null for mail a person wrote and for outbound messages. Replies to auto_reply and delivery_status messages are refused, see Reply to a message.Metadata for each attachment:
id, filename, content_type, size_bytes, status, download_path, content_id, and inline. inline is true for images shown inside the body (a logo or a signature image, referenced from the HTML as cid: plus content_id) and false for files attached for their own sake. status is stored, pending, failed, too_large, or withheld (not stored because the message failed the virus scan). Use attachment endpoints to retrieve bytes or extracted text.Send a message
Queues a new outbound email from the agent’s inbox. Supply anidempotency_key so that retries do not deliver the message twice.
POST /api/v1/inboxes/:id/messages
Requires: email:send
Send a message
Request parameters
One or more recipient addresses. Accepts plain addresses or RFC 5322
"Name <addr>" format.HTML body, sent with its images, inline styles,
<style> blocks and table layout. Scripts, frames, embedded objects, forms, event handlers and javascript: or data: links are removed before sending. When you send only html, a plain-text alternative is generated from it so text-only clients and spam filters see readable content; send your own text to control it.Stable key for safe retries. Reuse the same key on retry; choose a new one only for a genuinely new message.
Upload IDs returned by
POST /api/v1/inboxes/:id/uploads. Maximum 10 attachments and 10 MB total.ID of a saved draft to remove atomically when the message is sent. The draft is deleted even if the send is deduplicated by
idempotency_key.With
draft_id: the draft’s updated_at as you read it. When the draft was saved again since, the send is refused with 409 and details.reason draft_changed, and the draft stays, so you never send a version someone else replaced.Up to 10 custom headers. Two kinds are accepted:
X- headers of letters, digits and hyphens (for example X-Ticket-Id to correlate replies with your system), and Auto-Submitted.Mark automated mail
SetAuto-Submitted when no person wrote the message, for example a digest, a notification or an automatic answer. Well-behaved auto-responders and vacation replies do not answer mail that carries it, so two automated systems cannot keep replying to each other. Use one of the RFC 3834 keywords: auto-generated (produced by a process, such as a report), auto-replied (an automatic reply to a message), auto-notified (a notification) or no (a person caused the message). Reply and forward accept the same headers.
Send an automated digest
Suppressed recipients
An address that bounced permanently or reported a message as spam is suppressed for your organization: sending to it again would hurt the delivery of everything else you send. A send, reply or forward that names one is refused before anything is queued, withvalidation_failed, details.reason recipient_suppressed and the suppressed addresses in details.addresses. Remove them and send again.
GET /api/v1/suppressions
Requires: an organization key with email:read, email:send or inboxes:manage. The list spans every agent of the organization, so agent tokens cannot read it.
List suppressed recipients
{ "suppressions": [...], "next_cursor": "..." }, newest first. Each entry has address, reason (bounced or complained), message_id (the message whose bounce or complaint added it, while it still exists) and created_at. Pass next_cursor as cursor for the next page.
Reply to a message
Sends a reply with correct threading headers so the conversation stays grouped.POST /api/v1/messages/:id/reply
Requires: email:send
Reply to a message
HTML reply body. Follows the same rules as
html when sending a message, including the generated plain-text alternative.When
true, replies to all recipients on the original message. Defaults to false. The inbox never writes to itself: its own address and plus-address variants of it (name+tag@…) are left out, while other inboxes of your organization stay recipients.Mail-loop protection
An agent that answers every message and a mailbox that answers every message automatically can mail each other forever. Two rules stop that:- Replying to a message whose
automatedisauto_replyordelivery_statusis refused with409anddetails.reasonmail_loop_risk. Do not answer an out-of-office or a bounce; reply to the person’s own message in the conversation instead, or send a new message. - A conversation accepts at most 10 replies per hour from your inbox. The next one is refused with
429,details.reasonthread_send_capand aRetry-Afterheader. Repeating a reply with theidempotency_keyof one that was already queued still returns that message.
Auto-Submitted: auto-generated header, so other systems can recognise it and do not answer it automatically either.
Forward a message
Forwards a message and its stored attachments to one or more new recipients. The forward starts with your optionaltext, followed by a header block (sender, date, subject, recipients) and the original message. An HTML original keeps its layout and remote images; images that referenced the original’s inline attachments are replaced by their descriptions, since attachments are forwarded as regular files.
POST /api/v1/messages/:id/forward
Requires: email:send
Forward a message
Attachments
Download attachment bytes
Returns raw attachment bytes. Save the output to a file or pipe it to a downstream process.GET /api/v1/attachments/:id
Requires: email:read
Download attachment bytes
Extract attachment text
Returns text extracted from a PDF, CSV, JSON, HTML, or plain-text attachment, from a forwarded email (.eml: its sender, recipients, date, subject, text and attachment names), or from a calendar invitation (.ics: what, when, where and who): no download needed.
Text extracted from a received attachment is screened like a message body before your agent can read it. The response carries screening with verdict, reasons and a warning when the text was flagged. When screening blocks the text, status is withheld and text is null. status is pending while extraction runs and unavailable for images and other binary files.
GET /api/v1/attachments/:id/text
Requires: email:read
Extract attachment text
Uploads
Upload file bytes before sending so you can attach them to outbound messages, replies, or drafts.Upload a file
POST /api/v1/inboxes/:id/uploads
Requires: email:send
Upload a file for attachment
id. Pass that ID in attachment_ids when calling the send, reply, or draft endpoints.
Delete an unused upload
DELETE /api/v1/uploads/:id
Removes an upload you no longer need. Unused uploads expire automatically after 24 hours; saved drafts retain their attached files until the draft itself is deleted.
Delete an upload
The maximum per-message attachment limit is 10 files and 10 MB total across all attachments. Sending attachments requires a paid plan: the Free Sandbox does not support outbound attachments.
Sender rules
Allow or block senders before the screening classifier runs. Managed on the inbox level: see Inboxes API for full details.POST /api/v1/inboxes/:id/sender-rules: add a ruleGET /api/v1/inboxes/:id/sender-rules: list rulesDELETE /api/v1/sender-rules/:rule_id: remove a rule
email:read. Adding or removing rules requires email:send and email:read.