Mail API reference

Mail API · Outbound-Messages

delete/v1/workspaces/{workspace_id}/messagesAuth

RTBF: delete every message log row for `recipient` (case-insensitive). Returns the deleted-row count.

The bulk GDPR erase (`messages.erase` in the SDKs): removes every delivery-log row sent to one recipient address in this workspace (with its stored body and events), and strips the address from the cc, bcc and reply-to lists of other rows, in one transaction. Repeating it is harmless (the second call deletes 0 rows).

Path parameters

workspace_id*string · uuid

Id of the workspace.

Query parameters

recipient*string · email

The recipient address whose messages to erase (matched case-insensitively).

Response · 200

deleted*number

Number of rows deleted.

Example

Request

DELETE https://api.mail.productcraft.co/v1/workspaces/{workspace_id}/messages
Authorization: Bearer YOUR_TOKEN

Response

{
  "deleted": 0
}