InboxesMessages

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:

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

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[] nullable

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

tostring[] nullable

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

subjectstring[] nullable

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

Response

countinteger required

Number of items returned.

limitinteger

Limit of number of items returned.

next_page_tokenstring

Page token for pagination.

Changes

Changed in 5 of the 34 revisions of this API.211

    • added the new optional query request parameter from

      new-optional-request-parameter

    • added the new optional query request parameter subject

      new-optional-request-parameter

    • added the new optional query request parameter to

      new-optional-request-parameter

    • added the optional property code to the response with the 404 status

      response-optional-property-added

    • added the optional property docs to the response with the 404 status

      response-optional-property-added

    • added the optional property fix to the response with the 404 status

      response-optional-property-added

    • added the new optional query request parameter include_unauthenticated

      new-optional-request-parameter

    This revision also has 2 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional query request parameter include_blocked

      new-optional-request-parameter

    • added the new optional query request parameter include_trash

      new-optional-request-parameter

    This revision also has 5 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • deleted the query request parameter include_blocked

      request-parameter-removed

    • deleted the query request parameter include_trash

      request-parameter-removed

    This revision also has 28 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog

    • added the new optional query request parameter include_blocked

      new-optional-request-parameter

    • added the new optional query request parameter include_trash

      new-optional-request-parameter