Empty a folder
POST/api/accounts/:accountId/folders/:folder/empty
Removes every message from the Trash or Spam folder. Every message is flagged \Deleted and expunged, which deletes it for good; emptying Spam does not move messages to Trash.
Only folders whose capabilities.empty is true (Trash and Spam) can be emptied; any other folder returns 400. An empty folder is not an error.
Request
Responses
- 204
- 400
- 401
- 404
- 424
Emptied.
Request failed.
The session has no mailbox access token. code is mail_token_missing; sign in again.
The account or the folder does not exist.
The IMAP, SMTP or Sieve server, or the platform, refused the request or could not be reached.