Erase a visitor’s data
Erases one visitor for a privacy erasure request: deletes its events, sessions, identify profile and live presence, and anonymises its payments, customer rows and subscriptions (amounts are kept, so revenue totals do not change; email, name and the visitor link are removed). Reports for the days involved are recomputed within minutes. This cannot be undone. Needs the admin role and an access token with visitors:write.
Related: Identify a visitor from your server and List visitors in Visitors.
Request
Path parameters
websitestringrequiredWebsite id or domain, e.g. example.com
1–253 characters
visitorIdstringrequired1–64 characters
Headers
AuthorizationstringrequiredBearer followed by an account token or an OAuth access token with the visitors:write scope.
Response
What was deleted and anonymised.
{
"status": "string",
"data": {
"visitorIds": [],
"events": 0,
"sessions": 0,
"visitors": 0,
"payments": 0,
"customers": 0,
"subscriptions": 0,
"exports": 0,
"days": []
}
}Response fields
| Field | Type | Description |
|---|---|---|
| status | "ok" | |
| data | object | |
| data.visitorIds | string[] | |
| data.events | integer | |
| data.sessions | integer | |
| data.visitors | integer | |
| data.payments | integer | |
| data.customers | integer | |
| data.subscriptions | integer | |
| data.exports | integer | |
| data.days | string[] |