Erase a visitor's data
Permanently delete everything WysLeap holds for one of your site's visitors, to fulfil an erasure request (GDPR Art. 17, CCPA right to delete): page views, events, session replays, heatmap data, hot leads, journeys, fingerprints, visitor links, server events sent with only a userId, and the known-person record. Send a visitorId, or a userId or email for a known person; it covers every browser ID linked to the same person. This cannot be undone. As the controller, you verify the request before calling this. Limit: 60 requests a minute per secret key.
SecretKeyBearerAuthorizationBearer <token>A site secret key (wl_sk_…) from Site Settings, for server-to-server calls. Never use it in a browser.
application/json- body
Exactly one of visitorId, userId or email.
visitorId?stringThe visitor's WysLeap visitor ID (WysLeap.visitorId in their browser), or the ID you sent with server events.
^[\w.-]{1,100}$length <= 100userId?stringYour user ID for a known person (WysLeap.identify or userId on server events).
length <= 200email?stringThe email given with identify() or a server event.
emailWhat was deleted.
application/json- response
visitorIds?array<string>deleted?integerRecords deleted in total.
byCollection?Records deleted per kind of data.
curl -X POST https://wysleap.com/api/v1/subjects/erase \ -H "Authorization: Bearer $WYSLEAP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "visitorId": "vis_abc123" }'{ "visitorIds": [ "string" ], "deleted": 0, "byCollection": { "property1": 0, "property2": 0 }}