> [!WARNING]
> **Developer Preview:** Available as part of the [Google Workspace Developer Preview Program](https://developers.google.com/workspace/preview.md.txt), which grants early access to certain features.

This page explains how to retrieve the details of a single quarantined message
with the
[`get`](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages/get.md.txt)
method of the
[`customers.quarantinedMessages`](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt)
resource in the Mail Admin Quarantine API. Use it to inspect a message's headers, subject,
body, and attachments before you decide whether to release or deny it.

## Prerequisites

- You completed the steps in [Set up the API](https://developers.google.com/workspace/gmail/admin-quarantine/guides/setup.md.txt).
- An access token that impersonates an administrator with an admin quarantine privilege and includes the `https://www.googleapis.com/auth/gmail.admin.quarantine` or `https://www.googleapis.com/auth/gmail.admin.quarantine.readonly` scope. See [Authorize with domain-wide delegation](https://developers.google.com/workspace/gmail/admin-quarantine/guides/authorize.md.txt).
- The resource name of a quarantined message, which you get from [List and search quarantined messages](https://developers.google.com/workspace/gmail/admin-quarantine/guides/list-search.md.txt).

## Get a quarantined message

To get a quarantined message, send a `GET` request to the
[`get`](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages/get.md.txt)
method on the message's resource name and choose how much content to return
with the `view` query parameter:

    GET https://mailadminquarantine.googleapis.com/v1/customers/CUSTOMER_ID/quarantinedMessages/MESSAGE_OWNER:MESSAGE_ID?view=MESSAGE_VIEW_DETAILS
    Authorization: Bearer ACCESS_TOKEN

Replace the following:

- <var translate="no">CUSTOMER_ID</var>: your [customer ID](https://developers.google.com/workspace/gmail/admin-quarantine/guides/setup.md.txt#customer-id).
- <var translate="no">MESSAGE_OWNER</var>: the email address of the mailbox owner, as returned in the `messageOwner` field.
- <var translate="no">MESSAGE_ID</var>: the Gmail message ID, as returned in the `messageId` field.

To find these values, call the
[`list`](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages/list.md.txt)
or
[`search`](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages/search.md.txt)
method of the `customers.quarantinedMessages` resource. You can pass the `name`
field from a `list` or `search` response directly as the request path, for
example
`https://mailadminquarantine.googleapis.com/v1/customers/01abc23de/quarantinedMessages/user@example.com:18d3ef45a8b2c1d0`.

### Message views

The `view` query parameter determines which fields the response includes:

| View | Returned fields |
|---|---|
| `MESSAGE_VIEW_BASIC` (default) | Quarantine metadata only: `name`, `messageId`, `messageOwner`, `quarantines`, `receiveTime`, `direction`, `state`, `retentionExpireTime`, and `triggeredRules`. |
| `MESSAGE_VIEW_DETAILS` | `name`, `messageId`, `messageOwner`, and the parsed `content` object with `subject`, `body`, `headers`, `attachments`, `labels`, and `classificationLabelValues`. |
| `MESSAGE_VIEW_RAW` | `name`, `messageId`, `messageOwner`, and `rawMessage`, the entire message in [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format as a base64url-encoded string. |

If you omit `view`, the API returns the basic view. An unrecognized view value
returns a `400 INVALID_ARGUMENT` error.

## Example response

The following response uses `view=MESSAGE_VIEW_DETAILS`:

```json
{
  "name": "customers/01abc23de/quarantinedMessages/user@example.com:18d3ef45a8b2c1d0",
  "messageId": "18d3ef45a8b2c1d0",
  "messageOwner": "user@example.com",
  "content": {
    "subject": "Urgent: Verify your account details",
    "body": "Please click the link below to verify your login credentials...",
    "headers": [
      {"name": "From", "value": "security-alert@external.example.net"},
      {"name": "To", "value": "user@example.com"},
      {"name": "Date", "value": "Tue, 22 Sep 2026 10:15:00 +0000"},
      {"name": "Subject", "value": "Urgent: Verify your account details"}
    ],
    "attachments": [
      {
        "filename": "invoice_update.pdf",
        "mimeType": "application/pdf",
        "sizeBytes": "142857",
        "attachmentId": "att_987654321"
      }
    ],
    "labels": ["^admin_quarantine"]
  }
}
```

The following table displays the content fields of a response:

| Field | Description |
|---|---|
| `content.subject` | The subject of the message. |
| `content.body` | The plain-text body or snippet of the message. |
| `content.headers[]` | The message headers, with MIME-decoded values. |
| `content.attachments[]` | The filename, MIME type, size in bytes, and ID of each attachment. |
| `content.labels[]` | Standard Gmail labels applied to the message. |
| `content.classificationLabelValues[]` | [Classification labels](https://support.google.com/a/answer/9292382) applied to the message, if any. |

## Decode a raw message

With `view=MESSAGE_VIEW_RAW`, the `rawMessage` field contains the complete
message in [RFC 2822](https://datatracker.ietf.org/doc/html/rfc2822) format,
encoded as a base64url string. Decode it to analyze the message with standard
email tooling, for example:

```python
import base64
import email

raw_message = response.json()['rawMessage']
mime_message = email.message_from_bytes(base64.urlsafe_b64decode(raw_message))
print(mime_message['Subject'])
```

## Next steps

- [Release or deny a message](https://developers.google.com/workspace/gmail/admin-quarantine/guides/release-deny.md.txt)