Skip to main content
AgentMail logo

Overview

Add AgentMail to any ModuleX agent or workflow. API-first email for agents and automation: create inboxes, send and receive messages, reply to and forward threads, manage drafts, and organize conversations with labels — over the AgentMail REST API (api.agentmail.to).
Categories: Communication · Email · Automation · Auth: API Key · Actions: 21

Authentication

API Key Authentication

Authenticate using your AgentMail API key
1

Step 1

Sign up or log in at https://agentmail.to
2

Step 2

Open the dashboard and navigate to the API Keys section
3

Step 3

Create a new API key or copy your existing one
4

Step 4

Paste the API key below

Required Credentials

Available Actions

Parameters

string
required
ID of the inbox to send from
string
required
Recipient email address (comma-separated for multiple)
string
required
Email subject line
string
Plain text email body
string
HTML email body
string
CC recipient email addresses (comma-separated)
string
BCC recipient email addresses (comma-separated)

Response

Parameters

string
required
ID of the inbox to reply from
string
required
ID of the message to reply to
string
Plain text reply body
string
HTML reply body
string
Override recipient email addresses (comma-separated)
string
CC email addresses (comma-separated)
string
BCC email addresses (comma-separated)
boolean
Reply to all recipients of the original message (Default: false)

Response

Parameters

string
required
ID of the inbox containing the message
string
required
ID of the message to forward
string
required
Recipient email addresses (comma-separated)
string
Override subject line
string
Additional plain text to prepend
string
Additional HTML to prepend
string
CC recipient email addresses (comma-separated)
string
BCC recipient email addresses (comma-separated)

Response

Parameters

string
required
ID of the inbox to list messages from
integer
Maximum number of results to return
string
Pagination token for the next page of results

Response

Parameters

string
required
ID of the inbox containing the message
string
required
ID of the message to retrieve

Response

Parameters

string
required
ID of the inbox containing the message
string
required
ID of the message to update
string
Comma-separated labels to add to the message
string
Comma-separated labels to remove from the message

Response

Parameters

string
required
ID of the inbox to list threads from
integer
Maximum number of results to return
string
Pagination token for the next page of results
string
Comma-separated labels to filter threads by
string
Filter threads before this ISO 8601 timestamp
string
Filter threads after this ISO 8601 timestamp

Response

Parameters

string
required
ID of the inbox containing the thread
string
required
ID of the thread to retrieve

Response

Parameters

string
required
ID of the inbox containing the thread
string
required
ID of the thread to update
string
Comma-separated labels to add to the thread
string
Comma-separated labels to remove from the thread

Response

Parameters

string
required
ID of the inbox containing the thread
string
required
ID of the thread to delete
boolean
Force permanent deletion instead of moving to trash (Default: false)

Response

Parameters

string
required
ID of the inbox to create the draft in
string
Recipient email addresses (comma-separated)
string
Draft subject line
string
Plain text draft body
string
HTML draft body
string
CC recipient email addresses (comma-separated)
string
BCC recipient email addresses (comma-separated)
string
ID of message being replied to
string
ISO 8601 timestamp to schedule sending

Response

Parameters

string
required
ID of the inbox to list drafts from
integer
Maximum number of results to return
string
Pagination token for the next page of results

Response

Parameters

string
required
ID of the inbox the draft belongs to
string
required
ID of the draft to retrieve

Response

Parameters

string
required
ID of the inbox containing the draft
string
required
ID of the draft to update
string
Recipient email addresses (comma-separated)
string
Draft subject line
string
Plain text draft body
string
HTML draft body
string
CC recipient email addresses (comma-separated)
string
BCC recipient email addresses (comma-separated)
string
ISO 8601 timestamp to schedule sending

Response

Parameters

string
required
ID of the inbox containing the draft
string
required
ID of the draft to delete

Response

Parameters

string
required
ID of the inbox containing the draft
string
required
ID of the draft to send

Response

Parameters

string
Username for the inbox email address
string
Domain for the inbox email address
string
Display name for the inbox

Response

Parameters

integer
Maximum number of results to return
string
Pagination token for the next page of results

Response

Parameters

string
required
ID of the inbox to retrieve

Response

Parameters

string
required
ID of the inbox to update
string
required
New display name for the inbox

Response

Parameters

string
required
ID of the inbox to delete

Response

Limits & Quotas

  • All calls go to https://api.agentmail.to/v0 over HTTPS with a 30s client timeout.
  • List endpoints are paginated: pass limit and the returned next_page_token (via page_token) to page through results.
  • Error model: non-2xx responses and timeouts are caught and returned as success=False + error rather than raising. Plan for retries on the agent side based on the error string.

Gmail

Klaviyo

Mailgun