Integrate AgentMail into your workflow. Create and manage email inboxes, send and receive messages, reply to threads, manage drafts, and organize threads with labels. Requires API Key.
Create a new email draft in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to create the draft in |
to | string | No | Recipient email addresses (comma-separated) |
subject | string | No | Draft subject line |
text | string | No | Plain text draft body |
html | string | No | HTML draft body |
cc | string | No | CC recipient email addresses (comma-separated) |
bcc | string | No | BCC recipient email addresses (comma-separated) |
inReplyTo | string | No | ID of message being replied to |
sendAt | string | No | ISO 8601 timestamp to schedule sending |
| Parameter | Type | Description |
|---|
draftId | string | Unique identifier for the draft |
inboxId | string | Inbox the draft belongs to |
subject | string | Draft subject |
to | array | Recipient email addresses |
cc | array | CC email addresses |
bcc | array | BCC email addresses |
text | string | Plain text content |
html | string | HTML content |
preview | string | Draft preview text |
labels | array | Labels assigned to the draft |
inReplyTo | string | Message ID this draft replies to |
sendStatus | string | Send status (scheduled, sending, failed) |
sendAt | string | Scheduled send time |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Create a new email inbox with AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
username | string | No | Username for the inbox email address |
domain | string | No | Domain for the inbox email address |
displayName | string | No | Display name for the inbox |
| Parameter | Type | Description |
|---|
inboxId | string | Unique identifier for the inbox |
email | string | Email address of the inbox |
displayName | string | Display name of the inbox |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Delete an email draft in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the draft |
draftId | string | Yes | ID of the draft to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the draft was successfully deleted |
Delete an email inbox in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to delete |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the inbox was successfully deleted |
Delete an email thread in AgentMail (moves to trash, or permanently deletes if already in trash)
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the thread |
threadId | string | Yes | ID of the thread to delete |
permanent | boolean | No | Force permanent deletion instead of moving to trash |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the thread was successfully deleted |
Forward an email message to new recipients in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the message |
messageId | string | Yes | ID of the message to forward |
to | string | Yes | Recipient email addresses (comma-separated) |
subject | string | No | Override subject line |
text | string | No | Additional plain text to prepend |
html | string | No | Additional HTML to prepend |
cc | string | No | CC recipient email addresses (comma-separated) |
bcc | string | No | BCC recipient email addresses (comma-separated) |
| Parameter | Type | Description |
|---|
messageId | string | ID of the forwarded message |
threadId | string | ID of the thread |
Get details of a specific email draft in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox the draft belongs to |
draftId | string | Yes | ID of the draft to retrieve |
| Parameter | Type | Description |
|---|
draftId | string | Unique identifier for the draft |
inboxId | string | Inbox the draft belongs to |
subject | string | Draft subject |
to | array | Recipient email addresses |
cc | array | CC email addresses |
bcc | array | BCC email addresses |
text | string | Plain text content |
html | string | HTML content |
preview | string | Draft preview text |
labels | array | Labels assigned to the draft |
inReplyTo | string | Message ID this draft replies to |
sendStatus | string | Send status (scheduled, sending, failed) |
sendAt | string | Scheduled send time |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Get details of a specific email inbox in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to retrieve |
| Parameter | Type | Description |
|---|
inboxId | string | Unique identifier for the inbox |
email | string | Email address of the inbox |
displayName | string | Display name of the inbox |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Get details of a specific email message in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the message |
messageId | string | Yes | ID of the message to retrieve |
| Parameter | Type | Description |
|---|
messageId | string | Unique identifier for the message |
threadId | string | ID of the thread this message belongs to |
from | string | Sender email address |
to | array | Recipient email addresses |
cc | array | CC email addresses |
bcc | array | BCC email addresses |
subject | string | Message subject |
text | string | Plain text content |
html | string | HTML content |
labels | array | Labels assigned to the message |
timestamp | string | Time the message was sent or drafted |
createdAt | string | Creation timestamp |
Get details of a specific email thread including messages in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the thread |
threadId | string | Yes | ID of the thread to retrieve |
| Parameter | Type | Description |
|---|
threadId | string | Unique identifier for the thread |
subject | string | Thread subject |
senders | array | List of sender email addresses |
recipients | array | List of recipient email addresses |
messageCount | number | Number of messages in the thread |
labels | array | Labels assigned to the thread |
lastMessageAt | string | Timestamp of last message |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
messages | array | Messages in the thread |
List email drafts in an inbox in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to list drafts from |
limit | number | No | Maximum number of drafts to return |
pageToken | string | No | Pagination token for next page of results |
| Parameter | Type | Description |
|---|
drafts | array | List of drafts |
count | number | Total number of drafts |
nextPageToken | string | Token for retrieving the next page |
List all email inboxes in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
limit | number | No | Maximum number of inboxes to return |
pageToken | string | No | Pagination token for next page of results |
| Parameter | Type | Description |
|---|
inboxes | array | List of inboxes |
count | number | Total number of inboxes |
nextPageToken | string | Token for retrieving the next page |
List messages in an inbox in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to list messages from |
limit | number | No | Maximum number of messages to return |
pageToken | string | No | Pagination token for next page of results |
| Parameter | Type | Description |
|---|
messages | array | List of messages in the inbox |
count | number | Total number of messages |
nextPageToken | string | Token for retrieving the next page |
List email threads in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to list threads from |
limit | number | No | Maximum number of threads to return |
pageToken | string | No | Pagination token for next page of results |
labels | string | No | Comma-separated labels to filter threads by |
before | string | No | Filter threads before this ISO 8601 timestamp |
after | string | No | Filter threads after this ISO 8601 timestamp |
| Parameter | Type | Description |
|---|
threads | array | List of email threads |
count | number | Total number of threads |
nextPageToken | string | Token for retrieving the next page |
Reply to an existing email message in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to reply from |
messageId | string | Yes | ID of the message to reply to |
text | string | No | Plain text reply body |
html | string | No | HTML reply body |
to | string | No | Override recipient email addresses (comma-separated) |
cc | string | No | CC email addresses (comma-separated) |
bcc | string | No | BCC email addresses (comma-separated) |
replyAll | boolean | No | Reply to all recipients of the original message |
| Parameter | Type | Description |
|---|
messageId | string | ID of the sent reply message |
threadId | string | ID of the thread |
Send an existing email draft in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the draft |
draftId | string | Yes | ID of the draft to send |
| Parameter | Type | Description |
|---|
messageId | string | ID of the sent message |
threadId | string | ID of the thread |
Send an email message from an AgentMail inbox
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to send from |
to | string | Yes | Recipient email address (comma-separated for multiple) |
subject | string | Yes | Email subject line |
text | string | No | Plain text email body |
html | string | No | HTML email body |
cc | string | No | CC recipient email addresses (comma-separated) |
bcc | string | No | BCC recipient email addresses (comma-separated) |
| Parameter | Type | Description |
|---|
threadId | string | ID of the created thread |
messageId | string | ID of the sent message |
subject | string | Email subject line |
to | string | Recipient email address |
Update an existing email draft in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the draft |
draftId | string | Yes | ID of the draft to update |
to | string | No | Recipient email addresses (comma-separated) |
subject | string | No | Draft subject line |
text | string | No | Plain text draft body |
html | string | No | HTML draft body |
cc | string | No | CC recipient email addresses (comma-separated) |
bcc | string | No | BCC recipient email addresses (comma-separated) |
sendAt | string | No | ISO 8601 timestamp to schedule sending |
| Parameter | Type | Description |
|---|
draftId | string | Unique identifier for the draft |
inboxId | string | Inbox the draft belongs to |
subject | string | Draft subject |
to | array | Recipient email addresses |
cc | array | CC email addresses |
bcc | array | BCC email addresses |
text | string | Plain text content |
html | string | HTML content |
preview | string | Draft preview text |
labels | array | Labels assigned to the draft |
inReplyTo | string | Message ID this draft replies to |
sendStatus | string | Send status (scheduled, sending, failed) |
sendAt | string | Scheduled send time |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Update the display name of an email inbox in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox to update |
displayName | string | Yes | New display name for the inbox |
| Parameter | Type | Description |
|---|
inboxId | string | Unique identifier for the inbox |
email | string | Email address of the inbox |
displayName | string | Display name of the inbox |
createdAt | string | Creation timestamp |
updatedAt | string | Last updated timestamp |
Add or remove labels on an email message in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the message |
messageId | string | Yes | ID of the message to update |
addLabels | string | No | Comma-separated labels to add to the message |
removeLabels | string | No | Comma-separated labels to remove from the message |
| Parameter | Type | Description |
|---|
messageId | string | Unique identifier for the message |
labels | array | Current labels on the message |
Add or remove labels on an email thread in AgentMail
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | AgentMail API key |
inboxId | string | Yes | ID of the inbox containing the thread |
threadId | string | Yes | ID of the thread to update |
addLabels | string | No | Comma-separated labels to add to the thread |
removeLabels | string | No | Comma-separated labels to remove from the thread |
| Parameter | Type | Description |
|---|
threadId | string | Unique identifier for the thread |
labels | array | Current labels on the thread |
- Category:
tools
- Type:
agentmail