Skip to main content
Moves up to 50 messages to the Trash mailbox, replacing whatever folders they were in. Trashed messages stay recoverable in the mail client until Trash is emptied; there is no permanent delete on this surface. Re-running it on the same ids is harmless. It is the only filing tool annotated as destructive (destructiveHint: true), so a client can ask for confirmation before running it without hard-coding tool names. To clear the inbox without deleting, use archive_emails; to file into a folder, use move_emails.

Parameters

string[]
required
1–50 message ids, as returned by search_emails or get_thread. Duplicates are collapsed.

Example

Call
Result
Ids the server refused are listed with the reason; the call only counts as an error when nothing was trashed:
Result — one stale id

Errors

  • This account has no Trash mailbox. Nothing was trashed. … — create one in the mail client, or use archive_emails or move_emails.
  • Trashed 0 message(s). Not updated (N): … Re-run search_emails or get_thread for current ids. — every id was refused.