Create Gate
Reference for the POST /console/v1/gates endpoint of the Statsig API.
https://statsigapi.net/console/v1/gatesAuthorizations
STATSIG-API-KEYstringrequiredapiKey (header)
Query parameters
includeArchiveMetadatastringWhen "true", populate archivedAt / archivedBy* / archiveReason on the gate when it is currently archived. When omitted or "false", those fields are absent from the response.
truefalseBody
application/jsonnamestringThe gate display name
min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$descriptionstringmax length: 1000rulesobject[]Show child attributes
namestringrequiredThe name of this rule.
passPercentagenumberrequiredOf the users that meet the conditions of this rule, what percent should return true.
min: 0max: 100conditionsobject[]requiredAn array of Condition objects.
targetValueoneOfnullablestring[]number[]stringnumberoperatorstringfieldstringnullablecustomIDstringnullabletypestringrequiredapp_versionbrowser_namebrowser_versioncountrycustom_fieldemailenvironment_tierfails_gatefails_segmentip_addresslocaleos_nameos_versionpasses_gatepasses_segmentpublictimeunit_iduser_iduser_agenturljavascriptdevice_modeltarget_appexperiment_groupenvironmentsstring[]The environments this rule is enabled for.
nullableidstringThe Statsig ID of this rule.
baseIDstringThe base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout
returnValueobjectThe return value of the rule.
completedAutomatedRolloutsobject[]Read-only: Automated rollout phases that have already completed.
timenumberpassPercentnumberrequiredpendingAutomatedRolloutsobject[]Read-only: Automated rollout phases that are scheduled but not yet complete.
timenumberpassPercentnumberrequiredtypestringPERMANENTTEMPORARYtargetAppsoneOfstringstring[]creatorIDstringnullablecreatorEmailstringnullableteamstringnullableteamIDstringnullablemonitoringMetricsobject[]Show child attributes
namestringrequiredtypestringrequiredreviewSettingsobjectWhether 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
requiredReviewbooleanrequiredreleasePipelineIDstringnullablegradual_rollout_strategyobjectOptional 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
typestringrequiredUse "gradual" to apply a gradual rollout to risky gate rule increases, or "bypass" to explicitly apply the direct change.
gradualbypassphasesobject[]Optional rollout phases in the same shape used by the product rollout editor. If omitted for "gradual", the server default schedule is used.
timenumberpass_percentnumberrequiredisCompletebooleanrequiredtimeStringstringphaseDurationMsnumberUsed for progressive rollouts to calculate when the next phase can start
idstringThe gate name ID
min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-.]*$isEnabledbooleantagsstring[]idTypestringmeasureMetricLiftsbooleanisTemplatebooleanResponse
application/jsonmessagestringrequiredA simple string explaining the result of the operation.
dataobjectrequiredShow child attributes
idstringrequiredID
namestringThe gate display name
min length: 3max length: 100pattern: ^[a-zA-Z0-9_\-. ]*$idTypestringdescriptionstringrequiredmax length: 1000lastModifierIDstringrequiredID of the last modifier.
nullablelastModifiedTimenumberrequiredTime of the last modification.
format: doublenullablelastModifierEmailstringrequiredEmail of the last modifier.
nullablelastModifierNamestringrequiredName of the last modifier.
nullablecreatorIDstringnullablecreatedTimenumberrequiredTimestamp when the entity was created.
format: doublecreatorNamestringrequiredName of the creator.
nullablecreatorEmailstringnullabletagsstring[]targetAppsoneOfstringstring[]holdoutIDsstring[]Holdouts applied to this configuration.
teamstringnullableteamIDstringnullableversionnumberVersion number
format: doublechecksPerHournumberrequiredformat: doublenullablestatusstringrequiredIn ProgressLaunchedDisabledArchivedtypestringrequiredTEMPORARYPERMANENTSTALETEMPLATEtypeReasonstringrequiredNONESTALE_PROBABLY_LAUNCHEDSTALE_PROBABLY_UNLAUNCHEDSTALE_PROBABLY_FORGOTTENSTALE_NO_RULESSTALE_PROBABLY_DEAD_CHECKSTALE_EMPTY_CHECKSSTALE_ALL_TRUESTALE_ALL_FALSEownerobjectSchema for owner data including ID, type, name. Note that if Entity is created by CONSOLE API, owner will be undefined.
{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}nullableownerIDstringID of the owner
abc123ownerTypestringType of the owner (e.g., SDK_KEY or USER)
USERownerNamestringThe name of the owner. This field is optional.
John DoeownerEmailstringThe email of the owner. This field is optional.
isTemplatebooleanstore0100ExposuresbooleanWhether this gate stores 0/100 exposures for monitoring/analysis.
permalinkstringrequiredA permalink to this gate in the Statsig Console.
format: uriarchivedAtnumberTimestamp (ms) of the most recent archive event when the gate is currently archived; null otherwise. May be null for gates archived before audit logging existed.
format: doublenullablearchivedByIDstringID of the user who archived this gate, when known and the gate is currently archived; null otherwise (e.g. automated archives have no user).
nullablearchivedByNamestringName of the user who archived this gate, when known and the gate is currently archived; null otherwise.
nullablearchivedByEmailstringEmail of the user who archived this gate, when known and the gate is currently archived; null otherwise.
nullablearchiveReasonstringFree-text reason supplied when the gate was most recently archived; null when the gate is not currently archived or no reason was given.
nullableisEnabledbooleanrequiredrulesobject[]requirednamestringrequiredThe name of this rule.
passPercentagenumberrequiredOf the users that meet the conditions of this rule, what percent should return true.
min: 0max: 100conditionsobject[]requiredAn array of Condition objects.
targetValueoneOfnullablestring[]number[]stringnumberoperatorstringfieldstringnullablecustomIDstringnullabletypestringrequiredapp_versionbrowser_namebrowser_versioncountrycustom_fieldemailenvironment_tierfails_gatefails_segmentip_addresslocaleos_nameos_versionpasses_gatepasses_segmentpublictimeunit_iduser_iduser_agenturljavascriptdevice_modeltarget_appexperiment_groupenvironmentsstring[]The environments this rule is enabled for.
nullableidstringThe Statsig ID of this rule.
baseIDstringThe base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout
returnValueobjectThe return value of the rule.
completedAutomatedRolloutsobject[]Read-only: Automated rollout phases that have already completed.
timenumberpassPercentnumberrequiredpendingAutomatedRolloutsobject[]Read-only: Automated rollout phases that are scheduled but not yet complete.
timenumberpassPercentnumberrequiredmeasureMetricLiftsbooleanmonitoringMetricsobject[]namestringrequiredtypestringrequiredreviewSettingsobjectrequiredReviewbooleanrequiredallowedReviewersobject[]nullableidstringrequirednamestringrequiredemailstringrequiredreleasePipelineIDstringnullableactiveReviewobjectreviewIDstringrequiredreviewStatusstringrequireddescriptionstringrequiredWas this helpful?