Skip to main content
POST
/
v1
/
log_custom_exposure
curl --request POST \
--url https://events.statsigapi.net/v1/log_custom_exposure \
--header 'Content-Type: application/json' \
--header 'statsig-api-key: <api-key>' \
--data '{
"exposures": [
{
"user": {
"userID": "user-123"
},
"experimentName": "checkout_flow_v2",
"group": "Test Group",
"ruleID": "rule_abc123",
"secondaryExposures": [
{
"gate": "is_employee",
"gateValue": "false",
"ruleID": "default"
}
]
}
]
}'
{
  "success": true
}

Authorizations

statsig-api-key
string
header
required

SDK API key (Server Secret or Client SDK Key)

Body

application/json
exposures
object[]
required

Array of exposure events to log

Minimum length: 1
  • Option 1
  • Option 2
  • Option 3
  • Option 4
user
object

Shared user object for all exposures

statsigMetadata
object

SDK metadata for tracking SDK type, version, and other diagnostic information

Example:
{
"sdkType": "js-client",
"sdkVersion": "4.20.0"
}

Response

202 - application/json

Exposures accepted for processing

success
boolean
required

Whether the request was successful

I