---
title: "Return a Message"
method: GET
path: "/v3/grants/{grant_id}/messages/{message_id}"
tags: ["Messages"]
---

# Return a Message

`GET /v3/grants/{grant_id}/messages/{message_id}`

Returns the specified message.

## Query parameters

- `fields` 'standard' | 'include_headers' | 'include_basic_headers' | 'include_tracking_options' | 'raw_mime'
- `select` string
- `query_imap` boolean
- `shared_from` string

## Response `200`

Message response

- object
  - `request_id` string — The request ID.
  - `data` object — The response object.
    - `attachments` Attachment[] — An array of Attachment objects. For Google, linked Google Drive files are not included. For Microsoft, linked OneDrive files are not included.
      - `id` string, required — The ID of the attachment.
      - `content_type` string — The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types) of the attachment, used by the email client to determine how to display the attachment. If you don't provide a type, Nylas infers it from the file name. The value of this field is exactly the same as the email attachment's `Content-Type` header. The provider might set additional parameters, such as `name` and `charset`. Nylas returns an empty `content_type` field if an attachment file name contains non-ASCII characters (for example, accented characters like `ü`). This is because Google can't detect its content type.
      - `filename` string — The file name of the attachment.
      - `grant_id` string — The ID of grant for the connected user.
      - `content_id` string — (Inline attachments only) The alphanumeric `cid` from the `<img>` tag in the message's HTML. For example, you might see something like `<img src=\"cid:ce9b9547-9eeb-43b2-ac4e-58768bdf04e4\">` in the message body. Sometimes, the `content_id` value is contained in angle brackets (for example, `<ce9b9547-9eeb-43b2-ac4e-58768bdf04e4>`).
      - `content_disposition` string — (Not supported for Microsoft and EWS) The content disposition of the attachment. Usually, this is `inline` or `attachment` followed by the file name (for example, `inline; filename="some-image.jpeg"`).
      - `is_inline` boolean — If `true`, indicates that the attachment is an inline file.
      - `size` integer — The size of the attachment, in bytes.
    - `bcc` MessageParticipant[] — An array of name/email address pairs that the message was BCC'd to. For received messages, this is nearly always empty.
      - `name` string
      - `email` string, email, required
    - `body` string — The body of the message as either plain-text or HTML content. If the message has both plain-text and HTML, Nylas returns the HTML version.
    - `cc` MessageParticipant[] — An array of name/email address pairs that the message was CC'd to.
      - `name` string
      - `email` string, email, required
    - `date` integer — Unix timestamp in seconds that represents when _the mail server_ received the message. This might be different from the unified `Date` header in a raw Message object.
    - `folders` string[] — The IDs of the folders that the message appears in. Microsoft messages can be in a single folder only. Google allows a single message to appear in multiple folders.
    - `from` MessageParticipantResponse[] — A list of name/email address pairs that the message was sent from. This is usually one pair only, but can be many.
      - `name` string
      - `email` string, email
    - `grant_id` string — The ID of grant for the connected user.
    - `headers` MessageHeader[] — An array of key-value pairs that contain the message headers. Nylas returns this field when you set the `fields` query parameter to either `include_headers` or `include_basic_headers`. - `fields=include_headers`: Returns the full set of headers on the message. - `fields=include_basic_headers`: Returns only the three RFC threading headers (`Message-ID`, `In-Reply-To`, `References`). Use this option when you only need to track message identity and thread relationships — payload size is significantly smaller than `include_headers`. A single message can sometimes have multiple headers with the same key name. Nylas adds all of the headers to the `headers` array without merging or de-duplicating the data. When the headers contain encoded data, Nylas adds it to the `headers` array without decoding it. If you need the decoded data, you need to build decoding logic into your project. Some headers might contain raw MIME information (for example, `=?Windows-1252?Q?Re:_Candidature_de_Mme_Leyah_Miller?=`).
      - `name` string, required
      - `value` string, required
    - `id` string — A globally unique object identifier for Microsoft accounts. An email address for Google accounts.
    - `in_reply_to` string — (EWS only) The ID of the message that this message replies to. This ID is the same as the `In-Reply-To` header.
    - `metadata` Metadata — The metadata associated with the object. For more information, see [Metadata](/docs/reference/api/#metadata).
    - `object` string — The object type of the response (in this case, `message`).
    - `raw_mime` string — A Base64url-encoded string containing the message data (including the body content). To get the raw MIME content for a message, set the `fields` query parameter to `raw_mime` in your request. When you request raw MIME data, Nylas returns the `grant_id`, `object`, `id`, and `raw_mime` fields only.
    - `reply_to` MessageParticipant[] — An array of name/email address pairs that should receive replies to the message.
      - `name` string
      - `email` string, email, required
    - `snippet` string — A short snippet (the first 100 characters, with HTML tags removed) of the message body. This is useful for displaying a preview of the message.
    - `starred` boolean — If `true`, shows that the message has been starred by the user. For EWS, this is only supported on Microsoft Exchange 2010 or later.
    - `subject` string — The subject of the message.
    - `thread_id` string — A reference to the parent Thread object. Every message is associated with a thread, whether that thread contains one message or many. If the message is new, Nylas assigns a `thread_id` to it.
    - `to` MessageParticipant[] — An array of name/email address pairs that the message was sent to.
      - `name` string
      - `email` string, email, required
    - `tracking_options` object — Tracking options for the message.
      - `opens` boolean — When `true`, shows that message open tracking is enabled.
      - `thread_replies` boolean — When `true`, shows that thread replied tracking is enabled.
      - `links` boolean — When `true`, shows that link clicked tracking is enabled.
      - `label` string — A label describing the message tracking purpose.
    - `unread` boolean — If `true`, shows that the message has not been read by the user.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `404` — Not Found
- `429` — Rate Limit
- `504` — Provider Failure

---

[API](https://skmtc.dev/nylas/apis/nylas-api.md) · [All operations](https://skmtc.dev/nylas/apis/nylas-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/nylas/nylas-api/revisions/51c2c1b4ecff/schema)
