List Messages
Lists messages in the inbox, most recent first. Pass `from`, `to`, or
`subject` to filter by substring. Filtered requests are served by
search, which caps `limit` at 100. For relevance-ranked full-text
search across sender, recipients, subject, and message body, use
`Search Messages`.
**CLI:**
```bash
agentmail inboxes:messages list --inbox-id <inbox_id>
```
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Path parameters
inbox_id
The ID of the inbox.
Query parameters
limit
Limit of number of items returned.
page_token
Page token for pagination.
labels
Labels to filter by.
before
Timestamp before which to filter by.
after
Timestamp after which to filter by.
ascending
Sort in ascending temporal order.
include_spam
Include spam in results.
include_blocked
Include blocked in results.
include_unauthenticated
Include unauthenticated in results.
include_trash
Include trash in results.
from
Filter to messages whose sender contains this value (substring match). Repeatable; all values must match.
to
Filter to messages whose recipients (to, cc, or bcc) contain this value (substring match). Repeatable; all values must match.
subject
Filter to messages whose subject contains this value (substring match). Repeatable; all values must match.
Response
This endpoint returns an object.
count
Number of items returned.
messages
Ordered by timestamp descending.
limit
Limit of number of items returned.
next_page_token
Page token for pagination.
Errors
404
Not Found Error
