Docs

Expose

Record split test exposures

Last updated:

This endpoint records that a visitor has seen a particular split test variation. The SDK calls this automatically when you call get().

Record Exposures

POST /v1/split-testing/expose Public key
Record one or more split test exposure events. The SDK batches these and sends them after a short delay.
ParameterTypeRequiredDescription
propertyId (body)stringThe property the tests belong to
exposures (body)arrayArray of exposure events
Response
{ "success": true }
Example
bash
curl -X POST "https://api.sessionsight.com/v1/split-testing/expose" \
  -H "x-api-key: YOUR_PUBLIC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "propertyId": "",
  "exposures": ""
}'

Exposure Object

Each item in the exposures array has:

FieldTypeDescription
splitTestKeystringThe test key
variationKeystringThe variation the visitor was assigned to
sessionIdstringSession the exposure belongs to. Visitor and user identity are resolved from the session on the backend.
timestampnumberUnix timestamp in milliseconds
attributesobjectVisitor attributes at the time of exposure