- [Resource: QuarantinedMessage](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#QuarantinedMessage)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#QuarantinedMessage.SCHEMA_REPRESENTATION)
- [Direction](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#Direction)
- [State](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#State)
- [TriggeredRule](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#TriggeredRule)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#TriggeredRule.SCHEMA_REPRESENTATION)
- [MessageContent](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#MessageContent)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#MessageContent.SCHEMA_REPRESENTATION)
- [Header](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#Header)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#Header.SCHEMA_REPRESENTATION)
- [Attachment](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#Attachment)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#Attachment.SCHEMA_REPRESENTATION)
- [ClassificationLabelValue](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#ClassificationLabelValue)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#ClassificationLabelValue.SCHEMA_REPRESENTATION)
- [ClassificationLabelFieldValue](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#ClassificationLabelFieldValue)
  - [JSON representation](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#ClassificationLabelFieldValue.SCHEMA_REPRESENTATION)
- [Methods](https://developers.google.com/workspace/gmail/admin-quarantine/reference/rest/v1/customers.quarantinedMessages.md.txt#METHODS_SUMMARY)

## Resource: QuarantinedMessage

The QuarantinedMessage resource represents an email message held in an administrative quarantine.

> [!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.

<br />

| JSON representation |
|---|
| ``` { "name": string, "messageId": string, "messageOwner": string, "quarantines": [ string ], "receiveTime": string, "direction": enum (`Direction`), "state": enum (`State`), "retentionExpireTime": string, "triggeredRules": [ { object (`TriggeredRule`) } ], "content": { object (`MessageContent`) }, "rawMessage": string } ``` |

| Fields ||
|---|---|
| `name` | `string` Identifier. The resource name of the quarantined message. Format: customers/{customer_id}/quarantinedMessages/{quarantined_message_id} |
| `messageId` | `string` Output only. The immutable ID of the underlying Gmail message. |
| `messageOwner` | `string` Output only. The email address of the owner of this message. |
| `quarantines[]` | `string` Output only. The resource names of the quarantines that this message belongs to. Format: customers/{customer_id}/quarantines/{quarantine_id} |
| `receiveTime` | ``string (`Timestamp` format)`` Output only. The timestamp of when the message was received. |
| `direction` | ``enum (`Direction`)`` Output only. The direction of the message (e.g., INBOUND, OUTBOUND). |
| `state` | ``enum (`State`)`` Output only. The current processing state of the message. |
| `retentionExpireTime` | ``string (`Timestamp` format)`` Output only. The timestamp until which this message will be retained. |
| `triggeredRules[]` | ``object (`TriggeredRule`)`` Output only. Information about the rules that caused the quarantine. |
| `content` | ``object (`MessageContent`)`` Output only. The detailed content and metadata of the quarantined email. |
| `rawMessage` | `string (bytes format)` Output only. The entire email message in an RFC 2822 formatted and base64url encoded string. Returns this if RAW content type is selected. |

## Direction

The direction of the message.

| Enums ||
|---|---|
| `DIRECTION_UNSPECIFIED` | Unspecified. |
| `INBOUND` | The quarantined message was received by the user. |
| `OUTBOUND` | The quarantined message was sent by the user. |

## State

The current processing state of the message.

| Enums ||
|---|---|
| `STATE_UNSPECIFIED` | Unspecified. |
| `PENDING_TRIAGE` | Message is in Quarantine. |
| `RELEASED` | Message was released from the quarantine. |
| `DENIED` | Message was denied while in the quarantine. |

## TriggeredRule

Information about a specific rule that caused a message to be quarantined.

| JSON representation |
|---|
| ``` { "policyId": string, "ruleId": string, "displayName": string } ``` |

| Fields ||
|---|---|
| `policyId` | `string` The policy ID that the established rule correlates to. |
| `ruleId` | `string` The ID for the specific established rule. |
| `displayName` | `string` The name or description of the established rule. |

## MessageContent

Detailed information about the content of a quarantined email message.

| JSON representation |
|---|
| ``` { "headers": [ { object (`Header`) } ], "attachments": [ { object (`Attachment`) } ], "body": string, "subject": string, "labels": [ string ], "classificationLabelValues": [ { object (`ClassificationLabelValue`) } ] } ``` |

| Fields ||
|---|---|
| `headers[]` | ``object (`Header`)`` The headers of the email message. |
| `attachments[]` | ``object (`Attachment`)`` The attachments found within the email message. |
| `body` | `string` The plain-text body or snippet of the email message. |
| `subject` | `string` The subject of the email message. |
| `labels[]` | `string` Standard labels applied to the message (e.g., "QUARANTINE"). |
| `classificationLabelValues[]` | ``object (`ClassificationLabelValue`)`` Classification Label values applied to the message. Only present for Google Workspace accounts. |

## Header

A header in an email message.

| JSON representation |
|---|
| ``` { "name": string, "value": string } ``` |

| Fields ||
|---|---|
| `name` | `string` The name of the header, such as "From" or "Subject". |
| `value` | `string` The value of the header, which is MIME decoded. |

## Attachment

An attachment within an email message.

| JSON representation |
|---|
| ``` { "filename": string, "mimeType": string, "sizeBytes": string, "attachmentId": string } ``` |

| Fields ||
|---|---|
| `filename` | `string` The filename of the attachment. |
| `mimeType` | `string` The MIME type of the attachment (e.g., "application/pdf"). |
| `sizeBytes` | `string (int64 format)` The size of the attachment in bytes. |
| `attachmentId` | `string` A unique identifier used to fetch the attachment's content. |

## ClassificationLabelValue

Classification Labels applied to the email message.

| JSON representation |
|---|
| ``` { "labelId": string, "fields": [ { object (`ClassificationLabelFieldValue`) } ] } ``` |

| Fields ||
|---|---|
| `labelId` | `string` The canonical or raw alphanumeric classification label ID. |
| `fields[]` | ``object (`ClassificationLabelFieldValue`)`` Field values for the given classification label ID. |

## ClassificationLabelFieldValue

Field values for a classification label.

| JSON representation |
|---|
| ``` { "fieldId": string, "selection": string } ``` |

| Fields ||
|---|---|
| `fieldId` | `string` The field ID for the Classification Label Value. |
| `selection` | `string` Selection choice ID for the selection option. |

| ## Methods ||
|---|---|
| ### `batchDeny` | > [!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. Denies a list of messages asynchronously. |
| ### `batchRelease` | > [!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. Releases a list of messages asynchronously. |
| ### `deny` | > [!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. Denies a message from a quarantine. |
| ### `get` | > [!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. Gets metadata and content for a quarantined message. |
| ### `list` | > [!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. Queries for quarantined messages using specific filter conditions. |
| ### `release` | > [!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. Releases a message from a quarantine to be delivered to the recipients. |
| ### `search` | > [!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. Searches for quarantined messages using specific search queries. |