Download OpenAPI specification:Download
Programmatic email inboxes for AI agents
Returns a paginated list of inboxes for the authenticated account.
| limit | integer [ 1 .. 100 ] Maximum number of inboxes to return. |
| page_token | string Pagination token returned from a previous list call. |
{- "inboxes": [
- {
- "pod_id": "pod_abc123",
- "inbox_id": "inbox_xyz789",
- "display_name": "Support Team",
- "client_id": "client_007",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T12:00:00Z"
}
], - "count": 42,
- "limit": 20,
- "next_page_token": "tok_nextpage"
}Creates a new email inbox.
| username | string Local part of the email address (before the @). Auto-generated if omitted. |
| domain | string Domain for the email address. Defaults to the account default domain. |
| display_name | string Human-readable label for the inbox. |
| client_id | string Optional client-supplied identifier for correlation. |
{- "username": "support",
- "domain": "agentmail.to",
- "display_name": "Support Team",
- "client_id": "client_007"
}{- "pod_id": "pod_abc123",
- "inbox_id": "inbox_xyz789",
- "display_name": "Support Team",
- "client_id": "client_007",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T12:00:00Z"
}Retrieves a single inbox by ID.
| inbox_id required | string The unique identifier of the inbox. |
{- "pod_id": "pod_abc123",
- "inbox_id": "inbox_xyz789",
- "display_name": "Support Team",
- "client_id": "client_007",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T12:00:00Z"
}Updates the display name of an existing inbox.
| inbox_id required | string The unique identifier of the inbox. |
| display_name required | string New display name for the inbox. |
{- "display_name": "New Name <[email protected]>"
}{- "pod_id": "pod_abc123",
- "inbox_id": "inbox_xyz789",
- "display_name": "Support Team",
- "client_id": "client_007",
- "created_at": "2024-01-15T10:30:00Z",
- "updated_at": "2024-01-15T12:00:00Z"
}Returns a paginated list of messages in the inbox.
| inbox_id required | string The unique identifier of the inbox. |
| limit | integer [ 1 .. 100 ] Maximum number of messages to return. |
| page_token | string Pagination token returned from a previous list call. |
| labels | Array of strings Filter messages by labels. |
| before | string <date-time> Return messages before this ISO 8601 timestamp. |
| after | string <date-time> Return messages after this ISO 8601 timestamp. |
| ascending | boolean Sort in ascending order (oldest first). Defaults to descending. |
| include_spam | boolean Include messages marked as spam. |
| include_blocked | boolean Include messages that were blocked. |
| include_trash | boolean Include messages in the trash. |
{- "messages": [
- {
- "inbox_id": "inbox_xyz789",
- "thread_id": "thread_abc123",
- "message_id": "msg_def456",
- "labels": [
- "inbox",
- "unread"
], - "timestamp": "2024-01-15T10:30:00Z",
- "size": 4096,
- "updated_at": "2024-01-15T12:00:00Z",
- "created_at": "2024-01-15T10:30:00Z",
- "bcc": [
- "string"
], - "reply_to": [
- "string"
], - "subject": "Hello from AgentMail",
- "preview": "Just checking in...",
- "text": "string",
- "html": "string",
- "extracted_text": "string",
- "extracted_html": "string",
- "in_reply_to": "string",
- "references": [
- "string"
], - "attachments": [
- {
- "attachment_id": "att_abc123",
- "size": 20480,
- "filename": "report.pdf",
- "content_type": "application/pdf",
- "content_disposition": "attachment; filename=\"report.pdf\"",
- "content_id": "<[email protected]>"
}
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}
], - "count": 42,
- "limit": 20,
- "next_page_token": "tok_nextpage"
}Sends an email from the inbox.
| inbox_id required | string The unique identifier of the inbox. |
string or Array of strings Recipient email address(es). | |
(string or null) or (Array of strings or null) CC recipient email address(es). | |
(string or null) or (Array of strings or null) BCC recipient email address(es). | |
| subject | string Subject of the message. |
| text | string Plain-text body. |
| html | string HTML body. |
(string or null) or (Array of strings or null) Reply-To email address(es). | |
| labels | Array of strings or null Labels to apply to the sent message. |
object or null Additional email headers. |
{- "cc": "string",
- "bcc": "string",
- "subject": "Hello from AgentMail",
- "text": "string",
- "html": "string",
- "reply_to": "string",
- "labels": [
- "string"
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "message_id": "msg_def456",
- "thread_id": "thread_abc123"
}Retrieves a single message by ID.
| inbox_id required | string The unique identifier of the inbox. |
| message_id required | string The unique identifier of the message. |
{- "inbox_id": "inbox_xyz789",
- "thread_id": "thread_abc123",
- "message_id": "msg_def456",
- "labels": [
- "inbox",
- "unread"
], - "timestamp": "2024-01-15T10:30:00Z",
- "size": 4096,
- "updated_at": "2024-01-15T12:00:00Z",
- "created_at": "2024-01-15T10:30:00Z",
- "bcc": [
- "string"
], - "reply_to": [
- "string"
], - "subject": "Hello from AgentMail",
- "preview": "Just checking in...",
- "text": "string",
- "html": "string",
- "extracted_text": "string",
- "extracted_html": "string",
- "in_reply_to": "string",
- "references": [
- "string"
], - "attachments": [
- {
- "attachment_id": "att_abc123",
- "size": 20480,
- "filename": "report.pdf",
- "content_type": "application/pdf",
- "content_disposition": "attachment; filename=\"report.pdf\"",
- "content_id": "<[email protected]>"
}
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}Adds or removes labels on a message.
| inbox_id required | string The unique identifier of the inbox. |
| message_id required | string The unique identifier of the message. |
| add_labels | Array of strings or null Labels to add to the message. |
| remove_labels | Array of strings or null Labels to remove from the message. |
{- "add_labels": [
- "read"
], - "remove_labels": [
- "unread"
]
}{- "inbox_id": "inbox_xyz789",
- "thread_id": "thread_abc123",
- "message_id": "msg_def456",
- "labels": [
- "inbox",
- "unread"
], - "timestamp": "2024-01-15T10:30:00Z",
- "size": 4096,
- "updated_at": "2024-01-15T12:00:00Z",
- "created_at": "2024-01-15T10:30:00Z",
- "bcc": [
- "string"
], - "reply_to": [
- "string"
], - "subject": "Hello from AgentMail",
- "preview": "Just checking in...",
- "text": "string",
- "html": "string",
- "extracted_text": "string",
- "extracted_html": "string",
- "in_reply_to": "string",
- "references": [
- "string"
], - "attachments": [
- {
- "attachment_id": "att_abc123",
- "size": 20480,
- "filename": "report.pdf",
- "content_type": "application/pdf",
- "content_disposition": "attachment; filename=\"report.pdf\"",
- "content_id": "<[email protected]>"
}
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}Sends a reply to an existing message.
| inbox_id required | string The unique identifier of the inbox. |
| message_id required | string The unique identifier of the message to reply to. |
(string or null) or (Array of strings or null) Override recipient email address(es). | |
(string or null) or (Array of strings or null) CC recipient email address(es). | |
(string or null) or (Array of strings or null) BCC recipient email address(es). | |
| text | string Plain-text body of the reply. |
| html | string HTML body of the reply. |
(string or null) or (Array of strings or null) Reply-To email address(es). | |
| labels | Array of strings or null Labels to apply to the reply. |
object or null Additional email headers. |
{- "to": "string",
- "cc": "string",
- "bcc": "string",
- "text": "string",
- "html": "string",
- "reply_to": "string",
- "labels": [
- "string"
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "message_id": "msg_def456",
- "thread_id": "thread_abc123"
}Sends a reply to all recipients of an existing message.
| inbox_id required | string The unique identifier of the inbox. |
| message_id required | string The unique identifier of the message to reply-all to. |
(string or null) or (Array of strings or null) Override recipient email address(es). | |
(string or null) or (Array of strings or null) CC recipient email address(es). | |
(string or null) or (Array of strings or null) BCC recipient email address(es). | |
| text | string Plain-text body of the reply. |
| html | string HTML body of the reply. |
(string or null) or (Array of strings or null) Reply-To email address(es). | |
| labels | Array of strings or null Labels to apply to the reply. |
object or null Additional email headers. |
{- "to": "string",
- "cc": "string",
- "bcc": "string",
- "text": "string",
- "html": "string",
- "reply_to": "string",
- "labels": [
- "string"
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "message_id": "msg_def456",
- "thread_id": "thread_abc123"
}Forwards an existing message to new recipients.
| inbox_id required | string The unique identifier of the inbox. |
| message_id required | string The unique identifier of the message to forward. |
(string or null) or (Array of strings or null) Recipient email address(es) to forward to. | |
(string or null) or (Array of strings or null) CC recipient email address(es). | |
(string or null) or (Array of strings or null) BCC recipient email address(es). | |
| subject | string or null Override subject for the forwarded message. |
| text | string Additional plain-text body prepended to the forwarded content. |
| html | string Additional HTML body prepended to the forwarded content. |
(string or null) or (Array of strings or null) Reply-To email address(es). | |
| labels | Array of strings or null Labels to apply to the forwarded message. |
object or null Additional email headers. |
{- "to": "string",
- "cc": "string",
- "bcc": "string",
- "subject": "string",
- "text": "string",
- "html": "string",
- "reply_to": "string",
- "labels": [
- "string"
], - "headers": {
- "property1": "string",
- "property2": "string"
}
}{- "message_id": "msg_def456",
- "thread_id": "thread_abc123"
}