Skip to content
Skip to main content
GET
/v3/grants/{grant_id}/drafts

Return all Drafts

Return all drafts in the user's Drafts folder.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.

Query parameters

limitinteger

The maximum number of objects to return. See Pagination for more information.

Default: 50
page_tokenstring

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.

metadata_pairstring

Pass a metadata key/value pair (for example, ?metadata_pair=key1:value) to search for metadata associated with objects. See Metadata for more information.

selectstring

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.

subjectstring

Return items with a matching subject. The filter is case insensitive and will match partial subjects.

any_emailstring

Return messages that have been sent or received from this comma-separated list of email addresses (for example, [email protected],[email protected]). You can specify a maximum of 25 email addresses.

tostring

Return items containing messages sent to this email address.

ccstring

Return items containing messages that were CC'd to this email address.

bccstring

Return items containing messages that were BCC'd to this email address, likely sent from the parent account. (Most SMTP gateways remove BCC information, so this appears only if the user sent the email message, or received it because they were on the BCC list.)

starredboolean

Return items with one or more starred messages. For EWS, this is only supported for Microsoft Exchange 2010 or later.

thread_idstring

Return items with a matching thread_id.

has_attachmentboolean

Return items with attachments.

query_imapboolean

(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.

Default: false

Responses

request_idstring

The request ID.

dataarray<object>
next_cursorstringnull

A cursor pointing to the next page of results for the request.

GEThttps://api.us.nylas.com/v3/grants/{grant_id}/drafts?limit=50&query_imap=false

Find your API key in the Nylas Dashboard under API Keys in your application settings.

grant_idrequiredstring

ID of the grant to access. Use /me/ to refer to the grant associated with an access token.