Erase a message

.md

Delete it for good, out of the bin only.

Scopesmail:write
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"
ParameterDescription
conversationErase the whole exchange as the bin sees it. Only what is in the bin is touched

Response

204, no body.

Errors

StatusCodeMeaning
400not_in_trashMove it to the bin first
403insufficient_scopeThis device does not hold mail:write
404resource_not_foundNo such message in a mailbox you can read. A number in the path finds none either