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 keyRecord one or more split test exposure events. The SDK batches these and sends them after a short delay.
| Parameter | Type | Required | Description |
|---|---|---|---|
| propertyId (body) | string | ✓ | The property the tests belong to |
| exposures (body) | array | ✓ | Array 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:
| Field | Type | Description |
|---|---|---|
splitTestKey | string | The test key |
variationKey | string | The variation the visitor was assigned to |
sessionId | string | Session the exposure belongs to. Visitor and user identity are resolved from the session on the backend. |
timestamp | number | Unix timestamp in milliseconds |
attributes | object | Visitor attributes at the time of exposure |