AgentMail
Manage email inboxes, threads, and messages with AgentMail
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.
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
to | string | No | No description |
subject | string | No | No description |
text | string | No | No description |
html | string | No | No description |
cc | string | No | No description |
bcc | string | No | No description |
inReplyTo | string | No | No description |
sendAt | string | No | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
username | string | No | No description |
domain | string | No | No description |
displayName | string | No | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
draftId | string | Yes | No description |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the draft was successfully deleted |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
| 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 | No description |
inboxId | string | Yes | No description |
threadId | string | Yes | No description |
permanent | boolean | No | No description |
| Parameter | Type | Description |
|---|
deleted | boolean | Whether the thread was successfully deleted |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
messageId | string | Yes | No description |
to | string | Yes | No description |
subject | string | No | No description |
text | string | No | No description |
html | string | No | No description |
cc | string | No | No description |
bcc | string | No | No description |
| Parameter | Type | Description |
|---|
messageId | string | ID of the forwarded message |
threadId | string | ID of the thread |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
draftId | string | Yes | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
messageId | string | Yes | No description |
| 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 |
createdAt | string | Creation timestamp |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
threadId | string | Yes | No description |
| 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 |
↳ messageId | string | Unique identifier for the message |
↳ 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 |
↳ createdAt | string | Creation timestamp |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
limit | number | No | No description |
pageToken | string | No | No description |
| Parameter | Type | Description |
|---|
drafts | array | List of drafts |
↳ 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 |
↳ preview | string | Draft preview text |
↳ sendStatus | string | Send status (scheduled, sending, failed) |
↳ sendAt | string | Scheduled send time |
↳ createdAt | string | Creation timestamp |
↳ updatedAt | string | Last updated timestamp |
count | number | Total number of drafts |
nextPageToken | string | Token for retrieving the next page |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
limit | number | No | No description |
pageToken | string | No | No description |
| Parameter | Type | Description |
|---|
inboxes | array | List of inboxes |
↳ 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 |
count | number | Total number of inboxes |
nextPageToken | string | Token for retrieving the next page |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
limit | number | No | No description |
pageToken | string | No | No description |
| Parameter | Type | Description |
|---|
messages | array | List of messages in the inbox |
↳ messageId | string | Unique identifier for the message |
↳ from | string | Sender email address |
↳ to | array | Recipient email addresses |
↳ subject | string | Message subject |
↳ preview | string | Message preview text |
↳ createdAt | string | Creation timestamp |
count | number | Total number of messages |
nextPageToken | string | Token for retrieving the next page |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
limit | number | No | No description |
pageToken | string | No | No description |
labels | string | No | No description |
before | string | No | No description |
after | string | No | No description |
| Parameter | Type | Description |
|---|
threads | array | List of email threads |
↳ 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 |
↳ lastMessageAt | string | Timestamp of last message |
↳ createdAt | string | Creation timestamp |
↳ updatedAt | string | Last updated timestamp |
count | number | Total number of threads |
nextPageToken | string | Token for retrieving the next page |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
messageId | string | Yes | No description |
text | string | No | No description |
html | string | No | No description |
to | string | No | No description |
cc | string | No | No description |
bcc | string | No | No description |
replyAll | boolean | No | No description |
| Parameter | Type | Description |
|---|
messageId | string | ID of the sent reply message |
threadId | string | ID of the thread |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
draftId | string | Yes | No description |
| Parameter | Type | Description |
|---|
messageId | string | ID of the sent message |
threadId | string | ID of the thread |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
to | string | Yes | No description |
subject | string | Yes | No description |
text | string | No | No description |
html | string | No | No description |
cc | string | No | No description |
bcc | string | No | No description |
| Parameter | Type | Description |
|---|
threadId | string | ID of the created thread |
messageId | string | ID of the sent message |
subject | string | subject output from the tool |
to | string | Recipient email address |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
draftId | string | Yes | No description |
to | string | No | No description |
subject | string | No | No description |
text | string | No | No description |
html | string | No | No description |
cc | string | No | No description |
bcc | string | No | No description |
sendAt | string | No | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
displayName | string | Yes | No description |
| 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 |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
messageId | string | Yes | No description |
addLabels | string | No | No description |
removeLabels | string | No | No description |
| Parameter | Type | Description |
|---|
messageId | string | Unique identifier for the message |
labels | array | Current labels on the message |
| Parameter | Type | Required | Description |
|---|
apiKey | string | Yes | No description |
inboxId | string | Yes | No description |
threadId | string | Yes | No description |
addLabels | string | No | No description |
removeLabels | string | No | No description |
| Parameter | Type | Description |
|---|
threadId | string | Unique identifier for the thread |
labels | array | Current labels on the thread |