Skip to main content
GET
Search Threads
Full-text search across one inbox’s threads. Returns count, limit, next_page_token and threads; page with next_page_token. Same thread fields as get_agentmail_inbox_threads, which is the one to use for everything in date order. To search individual messages rather than conversations use get_agentmail_inbox_messages_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

q
string
required

Full-text search query. Matched against the sender, recipients, and subject (substring) and the message body (tokenized full text).

limit
integer

Limit of number of items returned.

page_token
string

Page token for pagination.

before
string<date-time>

Timestamp before which to filter by.

after
string<date-time>

Timestamp after which to filter by.

Response

Response with status 200

count
integer
required

Number of items returned.

threads
SearchThreadItem · object[]
required

Ordered by relevance, best match first.

limit
integer

Limit of number of items returned.

next_page_token
string

Page token for pagination.