Deletes a logged email record (activity log type 2) and publishes an EAppMailDeletedEvent carrying the linked entity IDs, sender, recipients, subject and the EML/HTML file keys. Returns 200 with an empty body.
The record is looked up within the caller's tenant, and the caller must also be allowed to access the entity the email is linked to (employer, customer, lead, workflow or meeting, checked in that order); otherwise that entity's access check rejects the request.
The required permission depends on the entity the email is linked to, checked in this order: meeting, lead, workflow, employer, customer. The caller needs <entity>:delete_my_items (for example customers:delete_my_items), plus <entity>:delete_all_items when another user created the record. These permissions are checked in the service layer, not as an OAuth2 scope on the endpoint.
Errors: 400 if id is missing or not a UUID; 403 if the delete permission is missing; 404 if the record does not exist in the caller's tenant.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
200Email record deleted; empty body.
400The id path variable is missing or not a UUID.
403The caller lacks the delete permission for the linked entity.
404Email record not found.