https://api.us.nylas.com/v3/grants/{grant_id}/threadsReturn all threads
Returns all threads.
For Microsoft, IMAP, iCloud, Yahoo, and EWS, threads are ordered reverse chronologically by the latest message received.
For Google, thread ordering is not guaranteed to be reverse chronological due to a Gmail API limitation.
However, setting the in query parameter improves the likelihood of reverse chronological ordering significantly (approximately 40%).
While reverse chronological ordering remains unguaranteed even with the in parameter, we recommend using it to increase the chance of this ordering pattern.
429 errors or provider
rate limits when listing all threads, Nylas
recommends you set the limit parameter to 20 and add
query parameters to your request to
limit the results.Path parameters
Query parameters
Filter for threads that contain messages sent to or received from the email addresses in the comma-separated list. You may specify a maximum of 25 email addresses per query.
Filter for threads that contain messages BCC'd to the specified email address. Because most SMTP gateways remove BCC information from sent messages, any messages that Nylas returns are likely sent from the parent account.
For Microsoft grants, Nylas sometimes doesn't return messages that satisfy the conditions of
this query parameter. This is because of a limitation on the provider. Instead, you can use
the thread_id to retrieve a specific conversation.
Filter for threads that contain messages CC'd to the specified email address.
For Microsoft grants, Nylas sometimes doesn't return messages that satisfy the conditions of
this query parameter. This is because of a limitation on the provider. Instead, you can use
the thread_id to retrieve a specific conversation.
Filter for threads that include messages sent from the specified email address. If you want
to filter for threads that include messages sent from the current grant, use the in query
parameter and specify the Sent folder instead.
For Microsoft grants, Nylas sometimes doesn't return messages that satisfy the conditions of
this query parameter. This is because of a limitation on the provider. Instead, you can use
the thread_id to retrieve a specific conversation.
Returns the date when the earliest or first message in the thread was sent or received, in Unix timestamp format.
Filter for threads whose most recent message was received after the specified time, in Unix timestamp format.
Filter for threads whose most recent message was received before the specified time, in Unix timestamp format.
The maximum number of objects to return. See pagination for more information.
An identifier that specifies which page of data to return. You can get this value from the
next_cursor response field. See Pagination for more
information.
Specify a URL-encoded search query. Connected providers use their provider-specific syntax,
while Nylas Agent Accounts use Nylas full-text search syntax. The query parameters that you can
use alongside search_query_native depend on the provider:
- Google:
in,limit, andpage_token - Microsoft:
in,limit, andpage_token - IMAP/Yahoo/iCloud: Any parameter
- EWS: Any parameter except
thread_id - Nylas Agent Accounts: Any other parameter supported for Agent Accounts by this endpoint
For an overview of searching messages and threads with search_query_native across providers,
see Searching with Nylas.
If you're using a Nylas Agent Account, see
Email search for Agent Accounts for the complete Nylas
search syntax, examples, and limits.
Specify fields that you want Nylas to return, as a comma-separated list (for example,
select=id,updated_at). This allows you to receive only the portion of object data that you're
interested in. You can use select to optimize response size and reduce latency by limiting queries
to only the information that you need.
Return threads that contain messages with a matching subject. This filter is case-sensitive and returns partial matches.
Filter for threads that contain messages sent to the specified email address.
For Microsoft grants, Nylas sometimes doesn't return messages that satisfy the conditions of
this query parameter. This is because of a limitation on the provider. Instead, you can use
the thread_id to retrieve a specific conversation.