App Mail Records

Delete an email record

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.

delete/appmail/{id}

Request

  • Base URL
    https://api.surense.com/api/v1
  • URL
    https://api.surense.com/api/v1/appmail/{id}
  • Auth
    OAuth 2
    Client credentials
    Token URL: https://api.surense.com/oauth/token

Path parameters

idstring uuid required

Email record ID (UUID).

Response

Email record deleted; empty body.

Changes

No recorded changes to this operation across all 1 revision of this API.