Save a draft
POST/api/accounts/:accountId/drafts
Saves the message being written as a new draft in the Drafts folder and returns its new uid and generated messageId. Every field is optional; from must be an enabled identity of the account and defaults to the default identity. Attachments are not saved with drafts.
IMAP messages cannot be changed, so saving always appends a new message flagged \Draft and \Seen. To replace an earlier version, pass its uid: after the new draft is stored, the old one is removed like a deleted message (moved to Trash, or expunged when the account has no Trash folder). A failure to remove it is only logged.
An account without a Drafts folder returns 404.
Request
Responses
- 201
- 400
- 401
- 404
- 424
UID and Message-ID of the stored draft.
Request failed.
The session has no mailbox access token. code is mail_token_missing; sign in again.
Request failed.
The IMAP, SMTP or Sieve server, or the platform, refused the request or could not be reached.