Delete quarantined messages
const url = 'https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam';const options = { method: 'DELETE', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"conversation_ids":["eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9"]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request DELETE \ --url https://mail.work.optidata.cloud/api/mail/mailboxes/78/spam \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "conversation_ids": [ "eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9" ] }'Permanently remove messages from the quarantine.
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.
Request Bodyrequired
Section titled “Request Bodyrequired”object
Ids of the threads to act on.
Examples
{ "conversation_ids": [ "eyJkb21haW4iOiJhY21lLmV4YW1wbGUiLCJ1aWQiOjR9" ]}Responses
Section titled “ Responses ”The messages were removed from the quarantine.
object
A mailbox the user has access to.
object
Cross-application user id the mailbox belongs to.
Example
{ "mailbox": { "id": 78 }}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."}