/v3/grants/{grant_id}/messagesReturn all Messages
Returns all messages using standard pagination.
429 errors or provider
rate limits when listing messages, Nylas
recommends you set the limit parameter to 20 and add
query parameters to your request to
limit the results.Path parameters
Query parameters
Return messages that were sent to or received from this comma-separated list of email addresses
(for example, [email protected],[email protected]). Nylas returns messages that contain one
of the specified email addresses in the To, From, CC, or BCC fields. You can specify up to 25
email addresses per request.
Return messages that include the specified email address in the BCC list. Because most SMTP gateways remove BCC information, Nylas usually returns messages sent from the current grant.
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.
Return messages that include the specified email address in the CC list.
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.
Return the specified data for each message.
standard: Returns the standard message payload.include_headers: Returns messages and their custom headers.include_tracking_options: Returns messages and their tracking settings.raw_mime: Returns thegrant_id,object,id, andraw_mimefields for each message.
Return messages sent from the specified email address. If you want to filter for 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.
Return messages in the specified folder or label, by folder ID.
Required when using shared_from or query_imap.
The maximum number of objects to return. See Pagination for more information.
Pass a metadata key/value pair (for example, ?metadata_pair=key1:value) to search for metadata
associated with objects. See Metadata 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.
(IMAP, Yahoo, and iCloud only) When true, Nylas queries the IMAP server directly instead of the
Nylas database. You also need to set the in query parameter in your request so Nylas knows which
folder to query.
Return messages received after the specified time, in seconds using the Unix timestamp format.
Return messages received before the specified time, in seconds using the Unix timestamp format.
Specify a URL-encoded provider-specific query string. Each provider supports a limited set of
query parameters that you can use in your request alongside search_query_native:
- Google:
in,limit, andpage_token - Microsoft:
in,limit, andpage_token - IMAP/Yahoo/iCloud: Any parameter
- EWS: Any parameter except
thread_id
Required when using shared_from.
For more information, see Searching with Nylas.
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.
When true, Nylas returns starred messages.
EWS only supports starred messages on Microsoft Exchange 2010 or later.
Return messages with a matching subject. This filter is case-sensitive and returns partial matches.
Return 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.