Send server-side events
Send events from your backend: signups, purchases, subscription changes. Authenticated with a site secret key (Authorization: Bearer wl_sk_…); one event per request, or up to 100 as { "events": [...] }.
Every event needs an eventId that is unique for your site. Retries with the same eventId are counted once.
Events that fail validation are listed in rejected with their index and the reason; the rest are still stored. The response is 400 only when every event was rejected. Limit: 600 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
eventId*stringYour unique ID for this event, such as your order ID or your payment provider's event ID. Retries with the same eventId are counted once, so it's safe to resend after a timeout.
length <= 128type?string"event""event""pageview"event?stringEvent name in Title Case, e.g. "Purchase Completed" (required for type event).
length <= 100timestamp?stringWhen it happened, up to 72 hours ago. Defaults to now.
date-timevisitorId?stringThe tracker's visitor ID for this person, if your site passed it to your backend.
length <= 100sessionId?stringlength <= 200url?stringPage URL; campaign parameters in it are recorded (required for type pageview).
urititle?stringlength <= 300referrer?stringlength <= 2048properties?JSON metadata, under 8 KB.
value?numberMonetary value of the event.
currency?stringISO 4217 code for value, e.g. USD.
^[A-Z]{3}$conversion?booleanMark the event as a conversion (or not); otherwise decided from its name.
At least one event stored or already known.
application/json- response
accepted?integerduplicates?integerrejected?array<>curl -X POST https://wysleap.com/api/v1/events \ -H "Authorization: Bearer $WYSLEAP_SECRET_KEY" \ -H "Content-Type: application/json" \ -d '{ "event": "Purchase Completed", "eventId": "order_1042", "visitorId": "vis_abc123", "value": 49.0, "currency": "USD", "properties": { "plan": "Pro" } }'{ "accepted": 1, "duplicates": 0, "rejected": []}