Look up a visitor's data
What WysLeap holds for one of your site's visitors, to answer an access request (GDPR Art. 15, CCPA right to know). Send a visitorId, or a userId or email for a known person. Covers every browser ID linked to the same person, and server events sent with only a userId. 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 is held, per linked ID.
application/json- response
visitorIds?array<string>The ID you sent plus every browser ID linked to the same person.
visitors?array<>serverOnly?Server events counted as this person that carry no visitor ID of their own.
curl -X POST https://wysleap.com/api/v1/subjects/lookup \ -H "Authorization: Bearer $WYSLEAP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "visitorId": "vis_abc123" }'{ "visitorIds": [ "string" ], "visitors": [ { "visitorId": "string", "pageviews": 0, "events": 0, "sessions": 0, "replays": 0, "firstSeen": "2019-08-24T14:15:22Z", "lastSeen": "2019-08-24T14:15:22Z", "browser": "string", "country": "string", "screenResolution": "string", "recentPages": [ { "path": "string", "at": "2019-08-24T14:15:22Z" } ] } ], "serverOnly": { "pageviews": 0, "events": 0 }}