Trash or delete a thread
Requires scope: manage or inbox (inbox only in a signed-in dashboard session, and only to move to trash: permanent=true takes manage; no API key or app can hold it). Moves the thread to trash (deleted: false, the thread returned). Sent again for a thread already in trash it changes nothing, so a retried request never destroys mail. With permanent=true it deletes the thread for good, from any folder: its messages' content, raw email and attachments are removed, and thread.deleted is emitted. Trash is also emptied automatically 30 days after a thread was moved there. A test key cannot trash or delete a thread holding live mail (403 live_mode_required). An app connected by sign-in may move a thread to trash but not delete it for good: with permanent=true it gets 403 connected_app_not_allowed.
Request
- Base URL: https://api.mails.ai
- URL: https://api.mails.ai/v1/threads/{id}
- Auth: HTTP bearer
Path parameters
Thread id.
Query parameters
true deletes the thread for good instead of moving it to trash.
Response
The trashed thread, or the id of the thread deleted for good.
Changes
No recorded changes to this operation across all 1 revision of this API.