Skip to content

List quarantined messages

GET
/mail/mailboxes/{mailbox}/spam/listing
curl --request GET \
--url 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam/listing?page=1&limit=50' \
--header 'Authorization: Bearer <token>'

One page of the quarantine — messages the filtering service caught before they ever reached the mailbox. These messages do not live in a folder, so their ids are opaque strings; pass them back verbatim to read or act on one.

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.

page
integer
default: 1 >= 1

1-based page number.

limit
integer
default: 50 >= 1 <= 100

Page size.

One page of quarantined messages.

Media typeapplication/json

One page of the quarantine.

object
currentFilterTab

Always null — the quarantine has no filters.

null
shouldDisplayFilterTab
boolean
currentPage
integer
hasNext
boolean
hasPrevious
boolean
hasItems
boolean
hasFailed

Whether the quarantine could not be read in full.

boolean
items
Array<object>

A message held in the quarantine.

object
id

Opaque id. Pass it back verbatim.

string
uid
string | integer | null
subject
string | null
from

The sender, as written on the message.

string | null
fromName
string | null
to
string | null
date
string | null
isSeen
boolean
size
integer
hasAttachments
boolean
cc
Array | null
bcc
Array | null
replyTo
array | object | null
textPlain
string | null
textHtml
string | null
isAnswered
boolean
isDeleted
boolean
isDraft
boolean
headers

The raw headers, when they were fetched.

string
flags

The state of a message or thread, as a set of booleans.

object
isUnread
boolean
isFlagged

The user starred it.

boolean
hasAttachment
boolean
isReplied
boolean
isSentByMe
boolean
isForwarded
boolean
isInvite

It carries a calendar invitation.

boolean
isDraft
boolean
isDeleted
boolean
isNotificationSent

A read receipt was requested.

boolean
isUrgent
boolean
isLowPriority
boolean
isPriority
boolean
participants

The addresses of a message, grouped by role.

object
from
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
to
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
cc
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
bcc
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
replyTo
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
sender
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
notification
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
resentFrom
Array<object>

One participant of a message.

object
name

Display name, when one is known.

string | null
email
string format: email
type

The role the address plays: f sender, t recipient, c carbon copy, b blind copy, r reply-to.

string | null
identity

Where the message sits in the quarantine store.

object | null
Examples
Examplepage1
{
"currentFilterTab": null,
"shouldDisplayFilterTab": false,
"currentPage": 1,
"hasNext": false,
"hasPrevious": false,
"hasItems": true,
"hasFailed": false,
"items": [
{
"id": "eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9",
"uid": "4",
"subject": "You have won a prize",
"from": "Marketing <mkt@spam.example>",
"fromName": "",
"to": "jane.doe@acme.example",
"date": "2026-08-07T11:37:52.000000Z",
"isSeen": false,
"size": 16734,
"hasAttachments": false,
"cc": null,
"bcc": null,
"replyTo": null,
"textPlain": null,
"textHtml": null,
"isAnswered": false,
"isDeleted": false,
"isDraft": false,
"headers": ""
}
]
}

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"
}

The request body or query string failed validation.

Media typeapplication/json
object
message
required

The first validation message.

string
errors
required

Validation messages keyed by field name.

object
key
additional properties
Array<string>
Examples
Exampleinvalid
{
"message": "The conversations field is required.",
"errors": {
"conversation_ids": [
"The conversations field is required."
]
}
}

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."
}