REST Resource: customers.quarantinedMessages

Resource: QuarantinedMessage

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

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.

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

Denies a list of messages asynchronously.

batchRelease

Releases a list of messages asynchronously.

deny

Denies a message from a quarantine.

get

Gets metadata and content for a quarantined message.

list

Queries for quarantined messages using specific filter conditions.

release

Releases a message from a quarantine to be delivered to the recipients.
Searches for quarantined messages using specific search queries.