AgentMail inboxes > messages API is one of 29 APIs that AgentMail publishes on the APIs.io network, described by a machine-readable OpenAPI specification and an AsyncAPI event-driven specification.
Tagged areas include inboxes > messages. The published artifact set on APIs.io includes an OpenAPI specification, an AsyncAPI specification, API documentation, and an API reference.
This API exposes
13 operations
across 11 paths,
and defines 76 schemas.
It is described by OpenAPI 3.2.0, at version 1.0.0.
Requests are made against 4 base URLs: https://api.agentmail.to, https://x402.api.agentmail.to, https://mpp.api.agentmail.to, https://api.agentmail.eu.
The identity and technical contract details declared by the specification.
type__Labels
array
Labels to filter by.
type_messages_MessageSize
integer
Size of message in bytes.
type_messages_UpdateMessageRequest
object
2 properties
type__Before
string
Timestamp before which to filter by.
type_messages_BatchGetMessagesResponse
object
3 properties
3 required
type_messages_ReplyToMessageRequest
object
10 properties
type_messages_SendMessageBcc
BCC recipient address or addresses.
type_attachments_AttachmentId
string
ID of attachment.
type_attachments_AttachmentSize
integer
Size of attachment in bytes.
type_messages_ReplyAll
boolean
Reply to all recipients of the original message.
type_attachments_Attachment
object
6 properties
2 required
type_messages_MessageHeaders
object
Headers in message.
type_messages_MessageLabels
array
Labels of message.
type_messages_MessageCreatedAt
string
Time at which message was created.
type_messages_SendMessageAttachments
array
Attachments to include in message.
type_messages_MessageItem
object
18 properties
10 required
type_messages_SendMessageCc
CC recipient address or addresses.
type__IncludeUnauthenticated
boolean
Include unauthenticated in results.
type_messages_MessageUpdatedAt
string
Time at which message was last updated.
type_messages_ReplyAllMessageRequest
object
6 properties
type__ErrorFix
string
The concrete next action that resolves the error.
type__Count
integer
Number of items returned.
type_messages_SendMessageTo
Recipient address or addresses.
type__ErrorMessage
string
Error message.
type__ValidationErrorResponse
object
6 properties
2 required
type__IncludeTrash
boolean
Include trash in results.
type_messages_MessageAttachments
array
Attachments in message.
type__IncludeSpam
boolean
Include spam in results.
type_attachments_AttachmentContentId
string
Content ID of attachment.
type__ErrorName
string
Name of error.
type_messages_MessageCc
array
Addresses of CC recipients. In format username@domain.com or Display Name .
type_messages_MessageText
string
Plain text body of message.
type_attachments_SendAttachment
object
6 properties
type_messages_MessageId
string
ID of message.
type__ErrorResponse
object
5 properties
2 required
type_messages_MessageTimestamp
string
Time at which message was sent or drafted.
type_messages_SendMessageReplyTo
Reply-to address or addresses.
type__Ascending
boolean
Sort in ascending temporal order.
type_messages_BatchUpdateMessagesResponse
object
3 properties
3 required
type_messages_MessageSubject
string
Subject of message.
type__PageToken
string
Page token for pagination.
type_messages_MessageTo
array
Addresses of recipients. In format username@domain.com or Display Name .
type_messages_SendMessageResponse
object
2 properties
2 required
type_messages_BatchGetMessagesMessageIds
array
IDs of messages to fetch. Maximum 500 ids per request. Duplicates are rejected with a validation error. IDs not found in the inbox (including cross-inbox or pe…
type_messages_ListMessagesResponse
object
4 properties
2 required
type__IncludeBlocked
boolean
Include blocked in results.
type__Limit
integer
Limit of number of items returned.
type_messages_BatchUpdateMessagesMessageIds
array
IDs of messages to update. Maximum 50 ids per request. Duplicates are rejected with a validation error. IDs not found in the inbox (including cross-inbox or pe…
type__ErrorCode
string
Stable, machine-readable error code in snakecase (for example, notfound or missingpermission). Branch on this rather than the message text.
type_messages_BatchUpdateMessagesRequest
object
3 properties
1 required
type_messages_UpdateMessageResponse
object
2 properties
2 required
type__Query
string
Full-text search query. Matched against the sender, recipients, and subject (substring) and the message body (tokenized full text).
type_messages_UpdateMessageLabels
Label or list of labels.
type_messages_RawMessageResponse
object
S3 presigned URL to download the raw .eml file.
4 properties
4 required
type_messages_SendMessageRequest
object
10 properties
type_messages_SearchMessageHighlights
object
Matched fragments per field on a message search result, with matched terms wrapped in . A field key is present only when the query matched that field, so the p…
4 properties
type_messages_MessageFrom
string
Address of sender. In format username@domain.com or Display Name .
type_messages_MessagePreview
string
Text preview of message.
type_messages_MessageBcc
array
Addresses of BCC recipients. In format username@domain.com or Display Name .
type_attachments_AttachmentResponse
object
8 properties
4 required
type_messages_BatchGetMessagesRequest
object
1 property
1 required
type__After
string
Timestamp after which to filter by.
type_messages_MessageInReplyTo
string
ID of message being replied to.
type_messages_MessageReferences
array
IDs of previous messages in thread.
type_attachments_AttachmentContentDisposition
string
Content disposition of attachment.
type_inboxes_InboxId
string
The ID of the inbox.
type_messages_Message
object
23 properties
10 required
type_messages_SearchMessageItem
object
19 properties
10 required
type_messages_SendMessageHeaders
object
Headers to include in message.
type_attachments_AttachmentContentType
string
Content type of attachment.
type_messages_MessageHtml
string
HTML body of message.
type_messages_SearchMessagesResponse
object
4 properties
2 required
type_attachments_AttachmentFilename
string
Filename of attachment.
type_threads_ThreadId
string
ID of thread.
type__ErrorDocs
string
Link to the error reference entry for this code.
The full machine-readable OpenAPI contract behind this narrative.
Other APIs AgentMail publishes across the network.