Delete draft
delete_draftDeletes a draft created via save_draft, removing it from the mailbox. Refuses drafts already sent or unknown, ensuring only this deployment's drafts are removed.
Instructions
Gives up a draft this deployment holds and takes the copy of it back out of the owner's Drafts folder. The message the owner wrote is GONE and no call here brings it back, so ask the person you are acting for before deleting something they wrote. Nothing is sent by this call and nothing was ever sent by the draft: a draft reaches nobody. Only a draft this deployment created can be deleted, named by the draftId save_draft answered. A message the owner drafted in their own mail client is not one of them and is never touched. A draft that has already been sent with send_draft is refused too, in the same way a draft that never existed is: the message is a queued send that deleting the draft would leave running, and cancel_outgoing_email is what stops it. Asking twice is safe and the second call is refused as a draft this deployment does not hold, which is what a deleted draft is. The result says whether the copy left the mailbox with it: a mail server may refuse to give a copy up, and the folder a copy was put in may no longer be the one the account means by drafts — in both cases the message is left as the owner's to delete themselves, and nothing here touches it again.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| draftId | Yes | The draftId save_draft returned for the draft you are giving up. A UUID that names nothing after this call. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| state | Yes | What became of the copy in the owner's drafts folder. | |
| draftId | Yes | The identifier of the draft that was given up. It names no draft after this call, so a later call carrying it is refused as a draft this deployment does not hold. |