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).
Authentication
API Key Authentication
Authenticate using your AgentMail API keyStep 1
Step 2
Step 3
Step 4
Required Credentials
| Field | Description | Required | Format |
|---|---|---|---|
| AgentMail API Key | Your AgentMail API key | Yes | - |
Available Actions
send_message — Send an email message from an AgentMail inbox.
send_message — Send an email message from an AgentMail inbox.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "To"
}
},
"required": [
"success"
],
"title": "SendMessageOutput",
"type": "object"
}
reply_message — Reply to an existing email message in AgentMail.
reply_message — Reply to an existing email message in AgentMail.
Parameters
false)Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
}
},
"required": [
"success"
],
"title": "ReplyMessageOutput",
"type": "object"
}
forward_message — Forward an email message to new recipients in AgentMail.
forward_message — Forward an email message to new recipients in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
}
},
"required": [
"success"
],
"title": "ForwardMessageOutput",
"type": "object"
}
list_messages — List messages in an inbox in AgentMail.
list_messages — List messages in an inbox in AgentMail.
Parameters
Response
{
"$defs": {
"MessageSummary": {
"additionalProperties": false,
"description": "A single message row in ``list_messages``.",
"properties": {
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"from_": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "From"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview"
},
"timestamp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Timestamp"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
}
},
"title": "MessageSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"messages": {
"items": {
"$ref": "#/$defs/MessageSummary"
},
"title": "Messages",
"type": "array"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
}
},
"required": [
"success"
],
"title": "ListMessagesOutput",
"type": "object"
}
get_message — Get details of a specific email message in AgentMail.
get_message — Get details of a specific email message in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
},
"from_": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "From"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Text"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Html"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"timestamp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Timestamp"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
}
},
"required": [
"success"
],
"title": "GetMessageOutput",
"type": "object"
}
update_message — Add or remove labels on an email message in AgentMail.
update_message — Add or remove labels on an email message in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
}
},
"required": [
"success"
],
"title": "UpdateMessageOutput",
"type": "object"
}
list_threads — List email threads in AgentMail.
list_threads — List email threads in AgentMail.
Parameters
Response
{
"$defs": {
"ThreadSummary": {
"additionalProperties": false,
"description": "A single thread row in ``list_threads``.",
"properties": {
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"senders": {
"items": {
"type": "string"
},
"title": "Senders",
"type": "array"
},
"recipients": {
"items": {
"type": "string"
},
"title": "Recipients",
"type": "array"
},
"message_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Count"
},
"last_message_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Message At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"title": "ThreadSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"threads": {
"items": {
"$ref": "#/$defs/ThreadSummary"
},
"title": "Threads",
"type": "array"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
}
},
"required": [
"success"
],
"title": "ListThreadsOutput",
"type": "object"
}
get_thread — Get details of a specific email thread including messages in AgentMail.
get_thread — Get details of a specific email thread including messages in AgentMail.
Parameters
Response
{
"$defs": {
"ThreadMessage": {
"additionalProperties": false,
"description": "A single message inside ``get_thread``.",
"properties": {
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"from_": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "From"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Text"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Html"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"timestamp": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Timestamp"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
}
},
"title": "ThreadMessage",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"senders": {
"items": {
"type": "string"
},
"title": "Senders",
"type": "array"
},
"recipients": {
"items": {
"type": "string"
},
"title": "Recipients",
"type": "array"
},
"message_count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Count"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"last_message_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Last Message At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
},
"messages": {
"items": {
"$ref": "#/$defs/ThreadMessage"
},
"title": "Messages",
"type": "array"
}
},
"required": [
"success"
],
"title": "GetThreadOutput",
"type": "object"
}
update_thread — Add or remove labels on an email thread in AgentMail.
update_thread — Add or remove labels on an email thread in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
}
},
"required": [
"success"
],
"title": "UpdateThreadOutput",
"type": "object"
}
delete_thread — Delete an email thread in AgentMail (moves to trash, or permanently deletes if already in trash).
delete_thread — Delete an email thread in AgentMail (moves to trash, or permanently deletes if already in trash).
Parameters
false)Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"deleted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Deleted"
}
},
"required": [
"success"
],
"title": "DeleteThreadOutput",
"type": "object"
}
create_draft — Create a new email draft in AgentMail.
create_draft — Create a new email draft in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"draft_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft Id"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Text"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Html"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"in_reply_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "In Reply To"
},
"send_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send Status"
},
"send_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "CreateDraftOutput",
"type": "object"
}
list_drafts — List email drafts in an inbox in AgentMail.
list_drafts — List email drafts in an inbox in AgentMail.
Parameters
Response
{
"$defs": {
"DraftSummary": {
"additionalProperties": false,
"description": "A single draft row in ``list_drafts``.",
"properties": {
"draft_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft Id"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview"
},
"send_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send Status"
},
"send_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"title": "DraftSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"drafts": {
"items": {
"$ref": "#/$defs/DraftSummary"
},
"title": "Drafts",
"type": "array"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
}
},
"required": [
"success"
],
"title": "ListDraftsOutput",
"type": "object"
}
get_draft — Get details of a specific email draft in AgentMail.
get_draft — Get details of a specific email draft in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"draft_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft Id"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Text"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Html"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"in_reply_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "In Reply To"
},
"send_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send Status"
},
"send_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "GetDraftOutput",
"type": "object"
}
update_draft — Update an existing email draft in AgentMail.
update_draft — Update an existing email draft in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"draft_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Draft Id"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"subject": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Subject"
},
"to": {
"items": {
"type": "string"
},
"title": "To",
"type": "array"
},
"cc": {
"items": {
"type": "string"
},
"title": "Cc",
"type": "array"
},
"bcc": {
"items": {
"type": "string"
},
"title": "Bcc",
"type": "array"
},
"text": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Text"
},
"html": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Html"
},
"preview": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Preview"
},
"labels": {
"items": {
"type": "string"
},
"title": "Labels",
"type": "array"
},
"in_reply_to": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "In Reply To"
},
"send_status": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send Status"
},
"send_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Send At"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "UpdateDraftOutput",
"type": "object"
}
delete_draft — Delete an email draft in AgentMail.
delete_draft — Delete an email draft in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"deleted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Deleted"
}
},
"required": [
"success"
],
"title": "DeleteDraftOutput",
"type": "object"
}
send_draft — Send an existing email draft in AgentMail.
send_draft — Send an existing email draft in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"message_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Message Id"
},
"thread_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Thread Id"
}
},
"required": [
"success"
],
"title": "SendDraftOutput",
"type": "object"
}
create_inbox — Create a new email inbox with AgentMail.
create_inbox — Create a new email inbox with AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "CreateInboxOutput",
"type": "object"
}
list_inboxes — List all email inboxes in AgentMail.
list_inboxes — List all email inboxes in AgentMail.
Parameters
Response
{
"$defs": {
"InboxSummary": {
"additionalProperties": false,
"description": "A single inbox row in ``list_inboxes``.",
"properties": {
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"title": "InboxSummary",
"type": "object"
}
},
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"inboxes": {
"items": {
"$ref": "#/$defs/InboxSummary"
},
"title": "Inboxes",
"type": "array"
},
"count": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"default": null,
"title": "Count"
},
"next_page_token": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Next Page Token"
}
},
"required": [
"success"
],
"title": "ListInboxesOutput",
"type": "object"
}
get_inbox — Get details of a specific email inbox in AgentMail.
get_inbox — Get details of a specific email inbox in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "GetInboxOutput",
"type": "object"
}
update_inbox — Update the display name of an email inbox in AgentMail.
update_inbox — Update the display name of an email inbox in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"inbox_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Inbox Id"
},
"email": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Email"
},
"display_name": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Display Name"
},
"created_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Created At"
},
"updated_at": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Updated At"
}
},
"required": [
"success"
],
"title": "UpdateInboxOutput",
"type": "object"
}
delete_inbox — Delete an email inbox in AgentMail.
delete_inbox — Delete an email inbox in AgentMail.
Parameters
Response
{
"additionalProperties": false,
"properties": {
"success": {
"title": "Success",
"type": "boolean"
},
"error": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"default": null,
"title": "Error"
},
"deleted": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"default": null,
"title": "Deleted"
}
},
"required": [
"success"
],
"title": "DeleteInboxOutput",
"type": "object"
}
Limits & Quotas
- All calls go to
https://api.agentmail.to/v0over HTTPS with a 30s client timeout. - List endpoints are paginated: pass
limitand the returnednext_page_token(viapage_token) to page through results. - Error model: non-2xx responses and timeouts are caught and
returned as
success=False+errorrather than raising. Plan for retries on the agent side based on the error string.