Request data removal (GDPR)
Erase a recipient’s personal data across your account — GDPR right to erasure via one API call.
When a data subject asks you to erase their data, one call handles the wemail side. The erasure runs as a background job and is irreversible and audit-logged. It requires a full_access key.
POST /v3/data-removals
Body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
email | string | Required | The data subject’s address (lowercased before matching). |
notify_webhook_url | string | Optional | Optional URL we POST { removal_id, status, completed_at } to when the erasure finishes (best-effort — polling is the source of truth). |
What gets erased
| Parameter | Type | Required | Description |
|---|---|---|---|
Messages | redacted | Optional | Every message addressed to the person: their address is replaced in to/cc/bcc/reply-to, and subject, HTML/text bodies, template variables, custom headers and metadata are cleared. |
Events | anonymised | Optional | Delivery/open/click event rows keep their type and timestamp (your analytics counts stay truthful) but the recipient is redacted and metadata cleared. |
Verification results | deleted | Optional | Email-verification rows for the address are deleted, cached verdicts invalidated, and the address is redacted from stored job sources. |
Download logs | cleared | Optional | Hosted-upload download attribution for the recipient is cleared. |
Responses
| Status | Description |
|---|---|
202 | { removal_id, status: "pending" } — poll GET /v3/data-removals/{id}. |
403 | Key scope does not allow mutations (full_access required). |
429 | Rate limit exceeded (10 calls/minute). |
Code examples
cURL
curl -X POST https://api.wemail.io/v3/data-removals \
-H "Authorization: Bearer afn_live_…" \
-H "Content-Type: application/json" \
-d '{ "email": "person@example.com" }'Node.js
const res = await fetch("https://api.wemail.io/v3/data-removals", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.WEMAIL_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({ "email": "person@example.com" }),
});
const data = await res.json();Python
import os, requests
r = requests.post(
"https://api.wemail.io/v3/data-removals",
headers={"Authorization": f"Bearer {os.environ['WEMAIL_API_KEY']}"},
json={ "email": "person@example.com" },
)
data = r.json()