v34

latestOpenAPI 3.0.1raw.githubusercontent.com2026-07-21119235265.2 KB
Threads

List Threads

Lists threads, most recent first. Pass senders, recipients, or subject to filter by substring. Filtered requests are served by search, which caps limit at 100. For relevance-ranked full-text search across senders, recipients, subject, and message body, use Search Threads.

CLI:

agentmail threads list
get/v0/threads

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.

sendersstring[] nullable

Filter to threads whose senders contain this value (substring match). Repeatable; all values must match.

recipientsstring[] nullable

Filter to threads whose recipients contain this value (substring match). Repeatable; all values must match.

subjectstring[] nullable

Filter to threads 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.