Read a quarantined message
const url = 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam/eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9/reader';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/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.
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.
Opaque id of a quarantined message, exactly as returned by the quarantine listing.
Responses
Section titled “ Responses ”The quarantined message.
A quarantined message with its content expanded.
object
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.
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"}No quarantined message with that id.
Authentication failures use an error key rather than message.
object
Examples
{ "error": "Spam message not found"}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."}