Skip to content
Skip to main content
GET
/v3/grants/{grant_id}/messages/{message_id}

Return a Message

Returns the specified message.

NYLAS API KEYACCESS TOKEN

Parameters

Path parameters

grant_id*string

ID of the grant to access. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

message_id*string

ID of the message to access. We recommend you URL-encode this field, or you might receive a 404 error if the ID contains special characters (for example, #).

Query parameters

fieldsstring

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 the grant_id, object, id, and raw_mime fields for each message.
standardinclude_headersinclude_tracking_optionsraw_mime
Default: "standard"
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.

query_imapboolean

(IMAP, iCloud, and Yahoo only) When true, Nylas queries from the IMAP server directly instead of the Nylas database.

Default: false
shared_fromstring

(Microsoft only) When provided, Nylas returns items that were shared from the specified email address. It also accepts grant ID. This parameter only accepts single email address or grant ID. Check out the Shared folders guide for more information.

Responses

request_idstring

The request ID.

dataobject
GEThttps://api.us.nylas.com/v3/grants/nyla%40example.com/messages/{message_id}?fields=standard&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. You can also use the email address associated with the grant, or use /me/ to refer to the grant associated with an access token.

message_idrequiredstring

ID of the message to access. We recommend you URL-encode this field, or you might receive a `404` error if the ID contains special characters (for example, #).