List quarantined messages
const url = 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam/listing?page=1&limit=50';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}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.
Authorizations
Section titled “Authorizations”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters”Id of the mailbox. Every mailbox the caller may use is listed in their account.
Query Parameters
Section titled “Query Parameters”1-based page number.
Page size.
Responses
Section titled “ Responses ”One page of quarantined messages.
One page of the quarantine.
object
Always null — the quarantine has no filters.
Whether the quarantine could not be read in full.
A message held in the quarantine.
object
Opaque id. Pass it back verbatim.
The sender, as written on the message.
The raw headers, when they were fetched.
The state of a message or thread, as a set of booleans.
object
The user starred it.
It carries a calendar invitation.
A read receipt was requested.
The addresses of a message, grouped by role.
object
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
One participant of a message.
object
Display name, when one is known.
The role the address plays: f sender, t recipient, c carbon copy,
b blind copy, r reply-to.
Where the message sits in the quarantine store.
Examples
{ "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.
Authentication failures use an error key rather than message.
object
Examples
No bearer token sent
{ "error": "JWT passport exception: Missing bearer token in request"}The spam features are not enabled for this tenant.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Not available"}The request body or query string failed validation.
object
The first validation message.
Validation messages keyed by field name.
object
Examples
{ "message": "The conversations field is required.", "errors": { "conversation_ids": [ "The conversations field is required." ] }}Rate limit exceeded. Retry after the window resets.
Generic error envelope used by policy, binding and framework failures.
object
Human-readable description of the failure.
Examples
{ "message": "Too Many Attempts."}