gmail.users.messages.get
Retrieves a specific Gmail message by user and message ID, returning JSON with selectable minimal, full, raw, or metadata content for inspection or processing.
Instructions
Gets the specified message [HTTP GET]. Returns the requested resource as JSON — request bodies are built from the typed parameters (typed flags win over the params map), or read whole from body_file Siblings over the same resource: batchDelete, batchModify, delete, import, insert, list, modify, send, trash, untrash.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | [URL path segment] The ID of the message to retrieve. This ID is usually retrieved using `messages.list`. The ID is also contained in the result when a message is inserted (`messa | |
| query | No | Extra KEY=VALUE query pairs for endpoints whose parameters Discovery does not describe. | |
| format | No | [query parameter] The format to return the message in. Values: `minimal` = Returns only email message ID and labels; does not return the email headers, body, or payload.; `full` = Returns the full email message data with body content parsed in the `payload` field; the `raw` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.; `raw` = Returns the full email message data with body content in the `raw` field as a base64url encoded string; the `payload` field is not used. Format cannot be used when accessing the api using the gmail.metadata scope.; `metadata` = Returns only email message ID, labels, and email headers.. | full |
| params | No | Parameter map merged into the request; typed parameters win. | |
| userId | Yes | [URL path segment] The user's email address. The special value `me` can be used to indicate the authenticated user. | me |
| dry_run | No | Return the request that would be sent, without sending it. | |
| body_file | No | Read the request body from this file ('-' for stdin) instead of building one from the parameters. | |
| metadataHeaders | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | No | ||
| raw | No | ||
| payload | No | ||
| snippet | No | ||
| labelIds | No | ||
| threadId | No | ||
| historyId | No | ||
| internalDate | No | ||
| sizeEstimate | No | ||
| classificationLabelValues | No |