Delete approved drafts
delete_draftPermanently delete approved unsent drafts with a single-use preview token. Refuses the batch if any approved message is missing or no longer in Drafts; the action cannot be undone.
Instructions
Permanently delete the approved unsent drafts; only call after the user explicitly approved the preview. Cannot be undone.
Use it only with a token from preview_action(action="delete_draft") that the user approved. It deletes only drafts in Drafts, never other mail: to discard other mail, preview a move to Trash. Unless the operator turned it off, the user then confirms the exact change in the client's form.
Rechecks that every approved message is still in Drafts before any write; any missing or non-Drafts message refuses the whole batch. Deletes only the approved UIDs with UID STORE and UID EXPUNGE, requiring UIDPLUS.
Returns log_id, count, messages, partial, token_consumed and undo_supported=false. An expired, used or unknown token refuses: preview again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| token | Yes | Single-use token from the preview the user approved. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||