Discard held malware
Permanently removes isolated malware from the mailbox's held list.
POST
Permanently removes isolated malware from the mailbox's held list. Publishes one mailbox.message.discarded event. Retrying returns the same result and publishes nothing. Delete readable Spam through the thread delete endpoint. Only a person with spam.discard can discard held mail.
apiKeyheader
x-api-key<token>id*stringMatch
^mbx_[0-9a-hjkmnp-tv-z]{16,24}$messageId*stringMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$MailboxSpamHeldMessage
application/json- response
id*MessageIdMatch
^msg_[0-9a-hjkmnp-tv-z]{16,24}$disposition*stringValue in
"quarantined""isolated"reason*stringValue in
"spam""dmarc""virus""virus_unscanned""verdict_missing""phishing""fraud""prompt_injection"source*stringValue in
"receipt""classifier"from*subject*string|nullreceivedAt*stringheldAt*stringreleasedAt*string|nullthreadId*|nulldiscardedAt*string|nullimport { createClient } from "samva";
const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });
const result = await samva.mailboxes.discardSpamHeld({
"id": "example",
"messageId": "example"
});Example Response
{
"id": "string",
"disposition": "quarantined",
"reason": "spam",
"source": "receipt",
"from": {
"address": "string",
"name": "string"
},
"subject": "string",
"receivedAt": "string",
"heldAt": "string",
"releasedAt": "string",
"threadId": "string",
"discardedAt": "string"
}