GDPR Erasure
Erase one recipient (GDPR Article 17) across your GetMailer account in a single, idempotent call: their contacts and consent are deleted, their sent-mail history is pseudonymised, and their bounces, complaints and unsubscribes are kept as a one-way hash so they are never emailed against their will again.
Erase a recipient
POST /api/v1/erasureAPI key only (Authorization: Bearer gm_…, see Authentication) with the AUDIENCES_MANAGE or FULL_ACCESS scope. Dashboard sessions are not accepted.
curl -X POST https://api.getmailer.co/v1/erasure \
-H "Authorization: Bearer gm_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"email": "person@example.com",
"audienceIds": ["aud_tender"],
"senderDomains": ["tenderen.no"]
}'Body
| Field | Type | Description |
|---|---|---|
| string, required | The recipient to erase. Matched case-insensitively, also inside "Name <address>" recipients. | |
| audienceIds | string[], optional | Only delete contacts (and their consent, enrollments and events) in these audiences. Every id must belong to your account, otherwise 422. |
| platforms | string[], optional | Also include every audience whose platform is one of these slugs. |
| senderDomains | string[], optional | Only pseudonymise sent-mail history sent from these domains. Keys restricted to domains default to, and may not exceed, their own domains (403). |
Without any scope the whole account is covered. If one account sends for several products, pass the product's audienceIds (or platforms) and senderDomains so an account deletion in one product leaves the person's relationship with the others untouched.
Response
{
"object": "erasure",
"id": "cmhx2k3l90001abcd",
"scope": { "audiences": 1, "senderDomains": ["tenderen.no"] },
"counts": {
"contactsDeleted": 1,
"consentRecordsDeleted": 1,
"sequenceEnrollmentsDeleted": 2,
"automationEventsDeleted": 4,
"engagementRecordsDeleted": 1,
"emailsAnonymised": 12,
"scheduledEmailsCancelled": 0,
"emailEventsAnonymised": 37,
"trackedLinksRedacted": 3,
"bounceReportsAnonymised": 0,
"feedbackReportsAnonymised": 0,
"webhookDeliveriesRedacted": 12,
"queueJobsRedacted": 0,
"suppressionEntriesHashed": 1,
"optOutsHashed": 0,
"validationCacheEntriesDeleted": 1
}
}id identifies the audit record. The call is idempotent: repeating it changes nothing and returns all counts as 0, so it is safe to retry after a timeout or a 5xx.
What is erased
| Contacts | Deleted in every audience in scope (all audiences when none are given), with their tags, segment and topic memberships. |
| Consent records | Deleted for the contact and for the address in those audiences. |
| Sequence enrollments | Deleted with the contact, so no further sequence email is sent. |
| Automation events | Events recorded for the contact (with their payload) are deleted. |
| Engagement data | Engagement scores and send-time patterns of the contact are deleted. |
| Sent emails | The address is replaced by a pseudonym in to, cc, bcc and reply-to. Emails sent only to the person also lose subject, HTML and text body, headers and attachments. Status, timestamps and the email itself stay, so counts and statistics are unchanged. |
| Email events | Kept with their type and time; their data keeps only delivery fields (provider, message id, bounce type, status code). IP address, user agent, referer, clicked URL and error texts are removed. |
| Tracked links | Links of emails sent only to the person, or containing the address, are cut back to scheme and host. |
| Bounce and complaint reports | Recipient replaced by the pseudonym; raw message, headers and original subject removed. |
| Webhook and queue logs | The address is replaced by the pseudonym in stored deliveries; subject, IP and user agent are dropped for emails sent only to the person. |
| Scheduled emails | Cancelled when sent only to the person; otherwise the person is removed from the recipients. |
| Validation cache | The cached verification result for the address is deleted. |
The pseudonym is erased-<40 hex>@erased.invalid, derived from the hash below. It is the same for every email of that person (so history stays consistent) and can never be delivered to: sends to @erased.invalid are always suppressed.
Suppression is kept, as a hash
Bounces, complaints, manual blocks and unsubscribes protect the person from being emailed again, so they are never deleted by an erasure. Instead the plain address is removed and only HMAC-SHA256(server secret, lower-cased address) is kept. Every send path (API, batch, SMTP, broadcasts, sequences, webmail, Zapier) checks suppression by that hash, so the entry keeps working without storing the address. In the dashboard such entries appear as "Erased recipient"; they can still be removed by id.
Suppression entries are account-wide, so they are hashed for the whole account even when the request is scoped to some audiences or domains.
Errors
| 400 | Invalid JSON, invalid email or domain, or an unknown field. |
| 401 | No valid API key. |
| 403 | The key lacks AUDIENCES_MANAGE, or senderDomains are outside the key's domains. |
| 422 | audienceIds contains an id that is not one of your audiences (unknownAudienceIds). |
| 429 | Rate limit (60 per minute per account). Retry after the Retry-After seconds. |
| 500 / 503 | Nothing was changed (the erasure is one transaction). Retry. |
Audit
Each call writes an audit record with the account, the API key, the scope, the counts and the duration. It contains neither the address nor its hash.