Skip to main content

CreateMailbox

Creates a new email mailbox for your account. Optionally specify a custom domain to create a mailbox that can send outbound email. Optionally specify a custom name for the local part of the address. Each call creates a new mailbox — this tool is not idempotent. Inputs
string
A verified custom domain you own (e.g., "example.com"). Omit to use the default AgentPost domain. Only mailboxes on custom domains can send outbound email. The domain must be in active, pending_warmup, or pending_dns status.
string
Custom local part for the email address (e.g., "support" creates support@domain.com). Must be 3-64 characters, alphanumeric with dots and hyphens only. Only allowed on custom domains — omit for a randomly generated name.
Mailboxes can be created on domains in pending_dns status, but they will not be able to send email until the domain passes DNS verification and reaches pending_warmup or active status.
Output
string
Unique identifier for the mailbox.
string
The generated email address (e.g., calm.brook-42@agent.agentpost.email).
string
The domain the mailbox was created on.
boolean
Whether the mailbox can send outbound email. true only for mailboxes on custom domains in a sendable state.
boolean
Whether the domain has MX records verified for inbound email reception. Only relevant for custom domain mailboxes.
string
ISO 8601 timestamp of when the mailbox was created.

ListMailboxEmails

Lists all emails in a mailbox. Returns up to 50 most recent messages. You must own the mailbox. Inputs
string
required
The email address of the mailbox to list emails for.
boolean
When true, includes text_content for each message. Prefers html2text-converted content, falling back to plain text or stripped HTML. Defaults to false.
boolean
When true, returns thread summaries instead of individual messages — same format as ListThreads. Defaults to false.
Output
object
integer
Total number of messages returned.
array
List of message summaries. Each message includes id, subject, from, date, preview, thread_id, and optionally text_content when include_body is true.
When group_by_thread is true, the response matches the ListThreads format: { mailbox, thread_count, threads, next_cursor }.

DeleteMailbox

Deletes a mailbox and all of its messages. You must own the mailbox.
This action is irreversible. All messages in the mailbox are permanently deleted.
Inputs
string
required
The email address of the mailbox to delete.
Output
boolean
Always true when the mailbox was successfully deleted.
string
The email address of the deleted mailbox.

ListThreads

Lists conversation threads in a mailbox, grouped and sorted by latest activity. Returns compact thread summaries with no message bodies, optimized for minimal token usage. Inputs
string
required
The mailbox email address to list threads for.
string
Opaque pagination cursor. Pass the next_cursor value from a previous response to fetch the next page.
integer
Maximum number of threads to return. Must be between 1 and 50. Defaults to 20.
Output
object
integer
Number of threads returned in this response.
array
List of thread summaries, sorted by latest message date descending. Each thread includes thread_id, subject, message_count, latest_date, latest_preview, participants, and has_attachments.
string
Cursor for the next page of results. null when there are no more threads.
Use ReadThread to fetch the full conversation content for a specific thread. Single-message threads have message_count: 1.

ReadThread

Reads all messages in a conversation thread in chronological order (oldest first). You must own the thread’s mailbox. Inputs
string
required
The thread ID to read. Obtain this from ListThreads or from the thread_id field in other tool responses.
string
Response format for message content. Options: text, html, html2text. Defaults to "html2text".
  • html2text — HTML converted to clean readable text preserving links and structure. Recommended for AI agents.
  • text — original plain text part.
  • html — both plain text and full HTML content.
integer
When set, returns only the latest N messages in chronological order. Omit to get all messages. Maximum 100.
Output
string
The thread identifier.
string
The thread subject line.
integer
Total number of messages in the thread.
array
Messages in chronological order. Each message includes id, subject, from, to, cc, date, direction, text_content, has_attachments, attachment_count, and optionally attachments.The direction field is either "inbound" or "outbound".