Skip to content

Read a quarantined message

GET
/mail/mailboxes/{mailbox}/spam/{spamMessageId}/reader
curl --request GET \
--url https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam/eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9/reader \
--header 'Authorization: Bearer <token>'

The full content of one quarantined message — plain-text and HTML bodies, the addresses and the raw headers — so a user can decide whether it was caught in error. The answer is an array with a single entry, mirroring the conversation reader.

Requires the spam feature to be enabled for the tenant.

mailbox
required
integer

Id of the mailbox. Every mailbox the caller may use is listed in their account.

spamMessageId
required
string

Opaque id of a quarantined message, exactly as returned by the quarantine listing.

The quarantined message.

Media typeapplication/json
Array<object>

A quarantined message with its content expanded.

object
id
string
uid
string | integer | null
subject
string | null
from
string | null
from_name
string | null
to
string | null
cc
array | object | null
bcc
array | object | null
reply_to
array | object | null
date
string | null
text_plain
string | null
text_html
string | null
is_seen
boolean
is_answered
boolean
is_deleted
boolean
is_draft
boolean
size
integer
headers
string | null
has_attachments
boolean
Examplegenerated
[
{
"id": "example",
"uid": "example",
"subject": "example",
"from": "example",
"from_name": "example",
"to": "example",
"cc": [
"example"
],
"bcc": [
"example"
],
"reply_to": [
"example"
],
"date": "example",
"text_plain": "example",
"text_html": "example",
"is_seen": true,
"is_answered": true,
"is_deleted": true,
"is_draft": true,
"size": 1,
"headers": "example",
"has_attachments": true
}
]

Missing, malformed or expired authentication key.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing

No bearer token sent

{
"error": "JWT passport exception: Missing bearer token in request"
}

The spam features are not enabled for this tenant.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Exampledisabled
{
"message": "Not available"
}

No quarantined message with that id.

Media typeapplication/json

Authentication failures use an error key rather than message.

object
error
required
string
Examples
Examplemissing
{
"error": "Spam message not found"
}

Rate limit exceeded. Retry after the window resets.

Media typeapplication/json

Generic error envelope used by policy, binding and framework failures.

object
message
required

Human-readable description of the failure.

string
Examples
Examplethrottled
{
"message": "Too Many Attempts."
}