Skip to Content

Permanently delete a mailbox thread

Deletes a thread from Trash or Spam. Requires thread:write.

DELETE
/v1/mailboxes/{id}/threads/{threadId}

Deletes a thread from Trash or Spam. Requires thread:write. Returns 409 if the thread is outside those folders. Publishes mailbox.thread.deleted. Cleanup of stored files runs after the deletion commits.

Authorization

apiKey
headerx-api-key<token>

Path Parameters

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

Response Body

SuccessResponse

application/json
  1. response
success*boolean
Example Request
import { createClient } from "samva";

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

const result = await samva.mailboxes.deleteThread({
  "id": "example",
  "threadId": "example"
});
Example Response
{
  "success": true
}

Related documentation