inboxes > 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:

agentmail inboxes messages list --inbox-id <inbox_id>
get/v0/inboxes/{inbox_id}/messages

Request

  • Base URL
    https://api.agentmail.to
  • URL
    https://api.agentmail.to/v0/inboxes/{inbox_id}/messages
  • Auth
    HTTP bearer

Path parameters

inbox_idstring required

The ID of the inbox.

Query parameters

limitinteger

Limit of number of items returned.

page_tokenstring

Page token for pagination.

labelsstring[]

Labels to filter by.

beforestring date-time

Timestamp before which to filter by.

afterstring date-time

Timestamp after which to filter by.

ascendingboolean

Sort in ascending temporal order.

include_spamboolean

Include spam in results.

include_blockedboolean

Include blocked in results.

include_unauthenticatedboolean

Include unauthenticated in results.

include_trashboolean

Include trash in results.

fromstring[]

Filter to messages whose sender contains this value (substring match). Repeatable; all values must match.

tostring[]

Filter to messages whose recipients (to, cc, or bcc) contain this value (substring match). Repeatable; all values must match.

subjectstring[]

Filter to messages whose subject contains this value (substring match). Repeatable; all values must match.

Response

Response with status 200

countinteger required

Number of items returned.

limitinteger

Limit of number of items returned.

next_page_tokenstring

Page token for pagination.

Changes

    • info

      the endpoint scheme security Bearer was added to the API

    • info

      the endpoint scheme security BearerAuth was removed from the API

    • info

      api tag inboxes > messages added

    • info

      api tag InboxesMessages removed

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the optional property // to the response with the status

    • info

      added the new optional query request parameter from

    • info

      added the new optional query request parameter subject

    • info

      added the new optional query request parameter to

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status