DELETE
/v1/me/mail/messages/{id}Gone, with its attachments. There is no undo.
Only out of the bin
A message anywhere else answers not_in_trash. Everywhere else deleting means
moving to the bin, which is PATCH with {"folder": "trash"}. One call that
could wipe a message from any folder is one bug away from wiping the wrong one.
Request
curl -X DELETE "https://api.proppertrading.com/v1/me/mail/messages/msg_h3k8q2w7n4r9t5vx?conversation=1" \
-H "Authorization: Bearer ptat_9f2c1a44_3b8e7d2f5c9a1b4e6d8f0a2c4e6b8d1f"
| Parameter | Description |
|---|---|
conversation | Erase the whole exchange as the bin sees it. Only what is in the bin is touched |
Response
204, no body.
Errors
| Status | Code | Meaning |
|---|---|---|
| 400 | not_in_trash | Move it to the bin first |
| 403 | insufficient_scope | This device does not hold mail:write |
| 404 | resource_not_found | No such message in a mailbox you can read. A number in the path finds none either |