Skip to main content
GET
List Threads
Lists conversation threads in one inbox, newest first. Returns count, limit, next_page_token and threads; page with next_page_token. Each thread carries thread_id, labels, timestamp, senders, recipients, subject, preview, message_count, last_message_id, size and attachment metadata. Threads group messages; for the individual messages use get_agentmail_inbox_messages. To query rather than page, get_agentmail_inbox_threads_search.

Example

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Authorization
string
required

Bearer authentication

Path Parameters

inbox_id
string
required

The ID of the inbox.

Query Parameters

limit
integer

Limit of number of items returned.

page_token
string

Page token for pagination.

labels
string[]

Labels to filter by.

before
string<date-time>

Timestamp before which to filter by.

after
string<date-time>

Timestamp after which to filter by.

ascending
boolean

Sort in ascending temporal order.

include_spam
boolean

Include spam in results.

include_blocked
boolean

Include blocked in results.

include_unauthenticated
boolean

Include unauthenticated in results.

include_trash
boolean

Include trash in results.

Response

Response with status 200

count
integer
required

Number of items returned.

threads
ThreadItem · object[]
required

Ordered by timestamp descending.

limit
integer

Limit of number of items returned.

next_page_token
string

Page token for pagination.