Erase Customer (GDPR)

Anonymize all personal data for an end-customer to comply with a GDPR right-to-erasure request.

DELETE/api/v1/customers

Use this endpoint to fulfill a GDPR (or similar privacy law) right-to-erasure request from one of your end-customers. It anonymizes every piece of personal data Anderro stores about that customer, while preserving the structural and financial records needed for accounting and affiliate commission integrity.

What gets anonymized

For every tracking event in your SaaS product matching the given email:

  • customer_email is set to null
  • ip is set to null
  • user_agent is set to null
  • visitor_id is replaced with a random anon_* token
  • anonymized_at is stamped with the current time

For every webhook delivery payload that referenced the email:

  • The data.customer_email field inside the stored payload is rewritten to null

What is preserved

Financial and structural fields are kept intact so commissions and payouts remain auditable:

  • amount_cents, event_type, created_at, partnership_id, saas_product_id on tracking events
  • All commissions and payouts rows referencing the anonymized event

Request body

ParameterTypeDescription
emailrequired
stringEmail address of the end-customer to erase. Matched case-insensitively after trimming whitespace.

Example request

bash
curl -X DELETE https://anderro.com/api/v1/customers \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk_your_secret_key" \
  -d '{
    "email": "[email protected]"
  }'

Responses

200Erasure completed (or no-op if nothing matched)
json
{
  "data": {
    "anonymized": {
      "tracking_events": 3,
      "webhook_deliveries": 2
    }
  }
}

The endpoint is idempotent. If no rows match (already anonymized, never seen, or wrong email) the response still returns 200 with both counts at 0.

400Validation failed
json
{
  "error": "Validation failed",
  "details": {
    "fieldErrors": {
      "email": ["Invalid email address"]
    },
    "formErrors": []
  }
}

Scope

The endpoint only touches data within the SaaS product owning the API key you authenticate with. It cannot read or modify data of any other product on Anderro, even for the same email.

Irreversible

Anonymization cannot be undone. Once customer_email is set to null and visitor_id is rewritten, there is no way to re-attach the original identity to those events.