AgentMail

AgentMail

Email
basesolana
59 endpoints

Email infrastructure for AI agents. Create inboxes, send and receive emails, manage threads, drafts, and attachments.

Base URLhttps://api.dao.pub/market/agentmail
POST/v0/domainsFree

Add a custom domain.

POST JSON body. Returns domain with DNS records needed for verification.

Body
domainstring (required, e.g. 'example.com')
feedback_enabledboolean (required, enable bounce/complaint notifications)
GET/v0/domainsFree

List all custom domains.

GET with optional pagination. Returns verified and pending custom domains.

Query
limitnumber (optional)
page_tokenstring (optional)
GET/v0/domains/{domain_id}Free

Get domain details and verification status.

Replace {domain_id}. Returns domain status and required DNS records.

Path
domain_idstring (domain name)
DELETE/v0/domains/{domain_id}Free

Delete a custom domain.

Permanently removes the custom domain.

Path
domain_idstring
POST/v0/domains/{domain_id}/verifyFree

Trigger domain verification.

Triggers DNS verification for the domain. Check domain status after.

Path
domain_idstring
GET/v0/domains/{domain_id}/zone-fileFree

Get DNS zone file for a domain.

Returns the DNS zone file with required records for domain verification.

Path
domain_idstring
GET/v0/draftsFree

List all drafts across all inboxes.

GET with optional filters. Returns drafts across all inboxes ordered by updated_at.

Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
GET/v0/drafts/{draft_id}Free

Get a draft by ID.

Replace {draft_id}. Returns draft details including to, subject, text, html, and attachments.

Path
draft_idstring
POST/v0/inboxes$2.20

Create a new inbox with a real email address.

POST JSON body. Returns the created inbox. The inbox can immediately send and receive email.

Body
usernamestring (optional, randomly generated if omitted)
domainstring (optional, defaults to 'agentmail.to', must be a verified domain)
display_namestring (optional, format: 'Display Name <user@domain.com>')
client_idstring (optional)
GET/v0/inboxesFree

List all inboxes.

GET with optional pagination. Returns inboxes ordered by created_at descending.

Query
limitnumber (optional)
page_tokenstring (optional)
PATCH/v0/inboxes/{inbox_id}Free

Update inbox display name.

PATCH JSON body with display_name.

Path
inbox_idstring
Body
display_namestring (required)
DELETE/v0/inboxes/{inbox_id}Free

Delete an inbox.

Permanently deletes the inbox and all its messages.

Path
inbox_idstring
GET/v0/inboxes/{inbox_id}Free

Get inbox details.

Replace {inbox_id}. Returns inbox details including pod_id, display_name, and timestamps.

Path
inbox_idstring (inbox ID)
GET/v0/inboxes/{inbox_id}/draftsFree

List drafts in an inbox.

Replace {inbox_id}. Returns drafts ordered by updated_at.

Path
inbox_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
POST/v0/inboxes/{inbox_id}/drafts$0.01

Create a draft email.

Replace {inbox_id}. POST JSON body. Use send_at for scheduled sending.

Path
inbox_idstring
Body
tostring (optional, recipient addresses)
ccstring (optional)
bccstring (optional)
subjectstring (optional)
textstring (optional, plain text body)
htmlstring (optional, HTML body)
reply_tostring (optional)
labelsstring (optional)
in_reply_tostring (optional, message ID being replied to)
send_atstring (optional, ISO datetime for scheduled send)
client_idstring (optional)
DELETE/v0/inboxes/{inbox_id}/drafts/{draft_id}Free

Delete a draft.

Permanently deletes the draft.

Path
inbox_idstring
draft_idstring
PATCH/v0/inboxes/{inbox_id}/drafts/{draft_id}Free

Update a draft.

PATCH JSON body with fields to update.

Path
inbox_idstring
draft_idstring
Body
tostring (optional)
ccstring (optional)
bccstring (optional)
subjectstring (optional)
textstring (optional)
htmlstring (optional)
reply_tostring (optional)
send_atstring (optional, ISO datetime)
GET/v0/inboxes/{inbox_id}/drafts/{draft_id}Free

Get a draft in an inbox.

Replace path params. Returns full draft details.

Path
inbox_idstring
draft_idstring
POST/v0/inboxes/{inbox_id}/drafts/{draft_id}/sendFree

Send a draft email.

Sends the draft. Optionally update labels before sending. Returns message_id and thread_id.

Path
inbox_idstring
draft_idstring
Body
add_labelsstring (optional)
remove_labelsstring (optional)
GET/v0/inboxes/{inbox_id}/messagesFree

List messages in an inbox.

Replace {inbox_id}. Returns messages ordered by timestamp. Use labels, before/after, and include_spam to filter.

Path
inbox_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
include_spamboolean (optional)
GET/v0/inboxes/{inbox_id}/messages/{message_id}Free

Get a specific message.

Returns the full message with from, to, subject, text, html, extracted_text, attachments, headers, and timestamps.

Path
inbox_idstring
message_idstring
PATCH/v0/inboxes/{inbox_id}/messages/{message_id}Free

Update message labels.

PATCH JSON body to add or remove labels on the message.

Path
inbox_idstring
message_idstring
Body
add_labelsstring (optional)
remove_labelsstring (optional)
GET/v0/inboxes/{inbox_id}/messages/{message_id}/attachments/{attachment_id}Free

Get a message attachment.

Returns attachment metadata with a temporary download_url and expires_at.

Path
inbox_idstring
message_idstring
attachment_idstring
POST/v0/inboxes/{inbox_id}/messages/{message_id}/forward$0.01

Forward a message.

Forward the message to new recipients. Returns message_id and thread_id.

Path
inbox_idstring
message_idstring
Body
tostring | string[] (required)
ccstring | string[] (optional)
bccstring | string[] (optional)
subjectstring (optional)
textstring (optional)
htmlstring (optional)
labelsstring (optional)
attachments[object Object]
headersobject (optional)
GET/v0/inboxes/{inbox_id}/messages/{message_id}/rawFree

Get raw email message (RFC 2822).

Returns the raw email message content.

Path
inbox_idstring
message_idstring
POST/v0/inboxes/{inbox_id}/messages/{message_id}/reply$0.01

Reply to a message.

POST reply content. Set reply_all: true to reply to all recipients. Returns message_id and thread_id.

Path
inbox_idstring
message_idstring
Body
textstring (optional)
htmlstring (optional)
tostring | string[] (optional, override recipients)
ccstring | string[] (optional)
bccstring | string[] (optional)
reply_allboolean (optional)
labelsstring (optional)
attachments[object Object]
headersobject (optional)
POST/v0/inboxes/{inbox_id}/messages/{message_id}/reply-all$0.01

Reply all to a message.

Replies to all recipients of the original message. Returns message_id and thread_id.

Path
inbox_idstring
message_idstring
Body
textstring (optional)
htmlstring (optional)
reply_tostring | string[] (optional)
labelsstring (optional)
attachments[object Object]
headersobject (optional)
POST/v0/inboxes/{inbox_id}/messages/send$0.01

Send an email from an inbox.

Replace {inbox_id}. POST JSON body with 'to' and message content. Returns message_id and thread_id.

Path
inbox_idstring
Body
tostring | string[] (recipient addresses)
ccstring | string[] (optional)
bccstring | string[] (optional)
subjectstring (optional)
textstring (optional, plain text body)
htmlstring (optional, HTML body)
reply_tostring | string[] (optional)
labelsstring (optional)
attachments[object Object]
headersobject (optional, custom email headers)
GET/v0/inboxes/{inbox_id}/metricsFree

Get email metrics for an inbox.

Returns message metrics (sent, delivered, bounced, delayed, rejected, complained, received timestamps) for the time range.

Path
inbox_idstring
Query
event_typesstring (optional, e.g. 'message.sent', 'message.delivered', 'message.bounced', 'message.received')
start_timestampstring (required, ISO datetime)
end_timestampstring (required, ISO datetime)
GET/v0/inboxes/{inbox_id}/threadsFree

List email threads in an inbox.

Returns conversation threads. Each thread groups related messages with senders, recipients, subject, preview, and message_count.

Path
inbox_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
include_spamboolean (optional)
DELETE/v0/inboxes/{inbox_id}/threads/{thread_id}Free

Delete a thread.

Permanently deletes the thread and its messages.

Path
inbox_idstring
thread_idstring
GET/v0/inboxes/{inbox_id}/threads/{thread_id}Free

Get a thread with all its messages.

Returns the thread with all messages in the conversation ordered by timestamp ascending.

Path
inbox_idstring
thread_idstring
GET/v0/inboxes/{inbox_id}/threads/{thread_id}/attachments/{attachment_id}Free

Get a thread attachment.

Returns attachment metadata with download_url and expires_at.

Path
inbox_idstring
thread_idstring
attachment_idstring
GET/v0/metricsFree

Get email metrics across all inboxes.

Returns aggregated message metrics across all inboxes for the time range.

Query
event_typesstring (optional)
start_timestampstring (required, ISO datetime)
end_timestampstring (required, ISO datetime)
GET/v0/organizationsFree

Get current organization details.

Returns organization info including inbox_count, domain_count, inbox_limit, and domain_limit.

POST/v0/podsFree

Create a new pod.

POST JSON body. Creates a pod to group inboxes.

Body
namestring (optional)
client_idstring (optional)
GET/v0/podsFree

List all pods.

GET with optional pagination. Pods group inboxes together.

Query
limitnumber (optional)
page_tokenstring (optional)
GET/v0/pods/{pod_id}Free

Get pod details.

Replace {pod_id}. Returns pod details.

Path
pod_idstring
DELETE/v0/pods/{pod_id}Free

Delete a pod.

Permanently deletes the pod.

Path
pod_idstring
GET/v0/pods/{pod_id}/domainsFree

List domains in a pod.

Replace {pod_id}. Returns domains associated with the pod.

Path
pod_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
POST/v0/pods/{pod_id}/domainsFree

Add a domain to a pod.

Creates a custom domain scoped to the pod.

Path
pod_idstring
Body
domainstring (required)
feedback_enabledboolean (required)
DELETE/v0/pods/{pod_id}/domains/{domain_id}Free

Remove a domain from a pod.

Deletes the domain from the pod.

Path
pod_idstring
domain_idstring
GET/v0/pods/{pod_id}/draftsFree

List drafts across all inboxes in a pod.

Returns drafts from all inboxes in the pod.

Path
pod_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
GET/v0/pods/{pod_id}/drafts/{draft_id}Free

Get a draft in a pod.

Returns draft details.

Path
pod_idstring
draft_idstring
GET/v0/pods/{pod_id}/inboxesFree

List inboxes in a pod.

Returns inboxes belonging to the pod.

Path
pod_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
POST/v0/pods/{pod_id}/inboxes$2.20

Create an inbox in a pod.

Creates an inbox scoped to the pod.

Path
pod_idstring
Body
usernamestring (optional)
domainstring (optional)
display_namestring (optional)
client_idstring (optional)
GET/v0/pods/{pod_id}/inboxes/{inbox_id}Free

Get an inbox in a pod.

Returns inbox details within the pod.

Path
pod_idstring
inbox_idstring
DELETE/v0/pods/{pod_id}/inboxes/{inbox_id}Free

Delete an inbox from a pod.

Permanently deletes the inbox from the pod.

Path
pod_idstring
inbox_idstring
GET/v0/pods/{pod_id}/threadsFree

List threads across all inboxes in a pod.

Returns threads from all inboxes in the pod.

Path
pod_idstring
Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
include_spamboolean (optional)
GET/v0/pods/{pod_id}/threads/{thread_id}Free

Get a thread in a pod.

Returns the thread with all messages.

Path
pod_idstring
thread_idstring
GET/v0/pods/{pod_id}/threads/{thread_id}/attachments/{attachment_id}Free

Get a thread attachment in a pod.

Returns attachment metadata with download_url.

Path
pod_idstring
thread_idstring
attachment_idstring
GET/v0/threadsFree

List all threads across all inboxes.

Returns threads across all inboxes ordered by timestamp.

Query
limitnumber (optional)
page_tokenstring (optional)
labelsstring (optional)
beforestring (optional, ISO datetime)
afterstring (optional, ISO datetime)
ascendingboolean (optional)
include_spamboolean (optional)
GET/v0/threads/{thread_id}Free

Get a thread by ID.

Returns the thread with all messages.

Path
thread_idstring
GET/v0/threads/{thread_id}/attachments/{attachment_id}Free

Get a thread attachment.

Returns attachment metadata with download_url and expires_at.

Path
thread_idstring
attachment_idstring
POST/v0/webhooksFree

Create a webhook for email events.

POST JSON body with url and event_types. Returns webhook with secret for signature verification.

Body
urlstring (required, webhook endpoint URL)
event_typesstring (required, e.g. 'message.received', 'message.sent', 'message.delivered', 'message.bounced', 'message.complained', 'message.rejected', 'domain.verified')
pod_idsstring (optional, max 10)
inbox_idsstring (optional, max 10)
client_idstring (optional)
GET/v0/webhooksFree

List all webhooks.

GET with optional pagination. Returns configured webhooks.

Query
limitnumber (optional)
page_tokenstring (optional)
DELETE/v0/webhooks/{webhook_id}Free

Delete a webhook.

Permanently deletes the webhook.

Path
webhook_idstring
PATCH/v0/webhooks/{webhook_id}Free

Update webhook subscriptions.

PATCH to add/remove inbox or pod subscriptions.

Path
webhook_idstring
Body
add_inbox_idsstring (optional)
remove_inbox_idsstring (optional)
add_pod_idsstring (optional)
remove_pod_idsstring (optional)
GET/v0/webhooks/{webhook_id}Free

Get webhook details.

Replace {webhook_id}. Returns webhook details including secret and enabled status.

Path
webhook_idstring