Skip to Content

Empty a mailbox's Spam

Queues permanent deletion of the threads currently in Spam and returns their count. Requires thread:write. A thread restored before processing is skipped.

POST
/v1/mailboxes/{id}/spam/empty

Queues permanent deletion of the threads currently in Spam and returns their count. Requires thread:write. A thread restored before processing is skipped.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

id*string
Match^mbx_[0-9a-hjkmnp-tv-z]{16,24}$

Response Body

MailboxEmptySpamAccepted

application/json
  1. response
count*integer
Range0 <= value <= 9007199254740991
Example Request
import { createClient } from "samva";

const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });

const result = await samva.mailboxes.emptySpam({
  "id": "example"
});
Example Response
{
  "count": 0
}

Related documentation