Skip to main content
POST
/
v1
/
check_gate
curl --request POST \
--url https://api.statsig.com/v1/check_gate \
--header 'Content-Type: application/json' \
--header 'statsig-api-key: <api-key>' \
--data '{
"gateName": "new_user_onboarding",
"user": {
"userID": "user-123",
"email": "user@example.com"
}
}'
{
"name": "new_user_onboarding",
"value": true,
"rule_id": "2RamGsERWbWMIMnSfOlQuX",
"group_name": "Test Group"
}

Authorizations

statsig-api-key
string
header
required

SDK API key (Server Secret or Client SDK Key)

Body

application/json
  • Option 1
  • Option 2
gateName
string
required

Single gate name to check (use this OR gateNames, not both)

Required string length: 2 - 100
gateNames
string[]

Array of gate names to check (use this OR gateName, not both)

Required array length: 1 - 100 elements
user
object

User object containing identification and attributes for evaluation. At minimum, provide at least one identifier.

statsigMetadata
object

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

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

Response

200 - application/json

Gate evaluation result(s)

  • Option 1
  • Option 2
name
string
required

Gate name

value
boolean
required

Whether the gate passes for this user

rule_id
string | null
required

ID of the rule that matched (null if gate failed)

group_name
string | null
required

Name of the matching group (null if gate failed)

I