Create Gate
curl --request POST \
--url https://statsigapi.net/console/v1/gates \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "a_verbose_gate",
"idType": "userID",
"isEnabled": false,
"description": "helpful summary of what this gate does",
"lastModifierName": "CONSOLE API",
"lastModifierID": "5rfuqoxLIYTscuSaaCOlB8",
"targetApps": [
"my_app"
],
"team": "team",
"rules": [
{
"name": "All Conditions",
"passPercentage": 10,
"conditions": [
{
"type": "public"
},
{
"type": "user_id",
"targetValue": [
"111",
"222"
],
"operator": "any"
},
{
"type": "email",
"targetValue": [
"@outlook.com",
"@gmail.com"
],
"operator": "str_contains_any"
},
{
"type": "custom_field",
"targetValue": 31,
"operator": "gt",
"field": "age"
},
{
"type": "app_version",
"targetValue": "1.1.1",
"operator": "version_gt"
},
{
"type": "browser_name",
"targetValue": [
"Android",
"Chrome"
],
"operator": "any"
},
{
"type": "browser_version",
"targetValue": [
"94.0.4606.81",
"94.0.4606.92"
],
"operator": "any"
},
{
"type": "os_name",
"targetValue": [
"Android",
"Windows"
],
"operator": "none"
},
{
"type": "os_version",
"targetValue": "11.0.0",
"operator": "version_lte"
},
{
"type": "country",
"targetValue": [
"NZ",
"US"
],
"operator": "any"
},
{
"type": "passes_gate",
"targetValue": "my_gate_2"
},
{
"type": "fails_gate",
"targetValue": "my_gate_2"
},
{
"type": "time",
"targetValue": 1643070357193,
"operator": "after"
},
{
"type": "environment_tier",
"targetValue": [
"production"
],
"operator": "any"
},
{
"type": "passes_segment",
"targetValue": "growth_org"
},
{
"type": "fails_segment",
"targetValue": "growth_org"
},
{
"type": "ip_address",
"targetValue": [
"1.1.1.1",
"8.8.8.8"
],
"operator": "any"
}
],
"environment": null
}
],
"checksPerHour": 0,
"tags": [],
"monitoringMetrics": [
{
"name": "dau",
"type": "user"
}
]
}
'{
"message": "Gate created successfully.",
"data": {
"id": "a_gate",
"permalink": "https://console.statsig.com/company_id/gates/a_gate",
"name": "A Gate",
"description": "description",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifiedTime": 1704929983827,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "1vaQaBoLlkauH9iiuOSBP2",
"createdTime": 1704929979761,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"isEnabled": true,
"status": "In Progress",
"rules": [],
"checksPerHour": 0,
"type": "PERMANENT",
"typeReason": "NONE",
"team": null,
"reviewSettings": {
"requiredReview": false,
"allowedReviewers": []
},
"measureMetricLifts": true,
"owner": {
"ownerID": "user123",
"ownerName": "CONSOLE API",
"ownerType": "SDK_KEY",
"ownerEmail": ""
},
"monitoringMetrics": [],
"version": 1
}
}Gates
Create Gate
POST
/
console
/
v1
/
gates
Create Gate
curl --request POST \
--url https://statsigapi.net/console/v1/gates \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "a_verbose_gate",
"idType": "userID",
"isEnabled": false,
"description": "helpful summary of what this gate does",
"lastModifierName": "CONSOLE API",
"lastModifierID": "5rfuqoxLIYTscuSaaCOlB8",
"targetApps": [
"my_app"
],
"team": "team",
"rules": [
{
"name": "All Conditions",
"passPercentage": 10,
"conditions": [
{
"type": "public"
},
{
"type": "user_id",
"targetValue": [
"111",
"222"
],
"operator": "any"
},
{
"type": "email",
"targetValue": [
"@outlook.com",
"@gmail.com"
],
"operator": "str_contains_any"
},
{
"type": "custom_field",
"targetValue": 31,
"operator": "gt",
"field": "age"
},
{
"type": "app_version",
"targetValue": "1.1.1",
"operator": "version_gt"
},
{
"type": "browser_name",
"targetValue": [
"Android",
"Chrome"
],
"operator": "any"
},
{
"type": "browser_version",
"targetValue": [
"94.0.4606.81",
"94.0.4606.92"
],
"operator": "any"
},
{
"type": "os_name",
"targetValue": [
"Android",
"Windows"
],
"operator": "none"
},
{
"type": "os_version",
"targetValue": "11.0.0",
"operator": "version_lte"
},
{
"type": "country",
"targetValue": [
"NZ",
"US"
],
"operator": "any"
},
{
"type": "passes_gate",
"targetValue": "my_gate_2"
},
{
"type": "fails_gate",
"targetValue": "my_gate_2"
},
{
"type": "time",
"targetValue": 1643070357193,
"operator": "after"
},
{
"type": "environment_tier",
"targetValue": [
"production"
],
"operator": "any"
},
{
"type": "passes_segment",
"targetValue": "growth_org"
},
{
"type": "fails_segment",
"targetValue": "growth_org"
},
{
"type": "ip_address",
"targetValue": [
"1.1.1.1",
"8.8.8.8"
],
"operator": "any"
}
],
"environment": null
}
],
"checksPerHour": 0,
"tags": [],
"monitoringMetrics": [
{
"name": "dau",
"type": "user"
}
]
}
'{
"message": "Gate created successfully.",
"data": {
"id": "a_gate",
"permalink": "https://console.statsig.com/company_id/gates/a_gate",
"name": "A Gate",
"description": "description",
"idType": "userID",
"lastModifierID": "1vaQaBoLlkauH9iiuOSBP2",
"lastModifiedTime": 1704929983827,
"lastModifierName": "CONSOLE API",
"lastModifierEmail": null,
"creatorID": "1vaQaBoLlkauH9iiuOSBP2",
"createdTime": 1704929979761,
"creatorName": "CONSOLE API",
"creatorEmail": null,
"targetApps": [],
"holdoutIDs": [],
"tags": [],
"isEnabled": true,
"status": "In Progress",
"rules": [],
"checksPerHour": 0,
"type": "PERMANENT",
"typeReason": "NONE",
"team": null,
"reviewSettings": {
"requiredReview": false,
"allowedReviewers": []
},
"measureMetricLifts": true,
"owner": {
"ownerID": "user123",
"ownerName": "CONSOLE API",
"ownerType": "SDK_KEY",
"ownerEmail": ""
},
"monitoringMetrics": [],
"version": 1
}
}Authorizations
Body
application/json
Create a new gate
The gate display name
Required string length:
3 - 100Pattern:
^[a-zA-Z0-9_\-. ]*$Maximum string length:
1000Show child attributes
Show child attributes
Available options:
PERMANENT, TEMPORARY Show child attributes
Show child attributes
Whether reviews are required for this gate. If a gate has reviews required due to a project-level or team-level setting, setting this will have no effect.
Show child attributes
Show child attributes
Optional safe-change strategy for risky gate rule increases. When required by policy, clients should retry with this field set after user confirmation.
Show child attributes
Show child attributes
The gate name ID
Required string length:
3 - 100Pattern:
^[a-zA-Z0-9_\-.]*$Was this page helpful?
⌘I