Create Segment
https://statsigapi.net/console/v1/segmentsAuthorizations
STATSIG-API-KEYstringrequiredapiKey (header)
Body
application/jsonnamestringrequiredname of the segment
idstringoptional id of the segment (defaults to name)
descriptionstringdescription of the segment
typestringrequiredtype of the segment
idTypestringtype of id
tagsstring[]optional tags for categorization
creatorIDstringthe Statsig ID of the creator of this experiment
creatorEmailstringthe email of the creator of this experiment
teamstringoptional name identifier for the responsible team (enterprise only)
teamIDstringoptional identifier for the responsible team (enterprise only)
rulesobject[]Rule Object
Show child attributes
name[]stringrequiredThe name of this rule.
passPercentage[]numberrequiredOf the users that meet the conditions of this rule, what percent should return true.
conditions[]object[]requiredtargetValue[]oneOfoperator[]stringfield[]stringcustomID[]stringtype[]stringrequiredenvironments[]string[]The environments this rule is enabled for.
id[]stringThe Statsig ID of this rule.
baseID[]stringThe base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout
returnValue[]objectThe return value of the rule.
completedAutomatedRollouts[]object[]Read-only: Automated rollout phases that have already completed.
time[]numberpassPercent[]numberrequiredpendingAutomatedRollouts[]object[]Read-only: Automated rollout phases that are scheduled but not yet complete.
time[]numberpassPercent[]numberrequiredResponse
application/jsonmessagestringrequiredA simple string explaining the result of the operation.
dataobjectrequiredShow child attributes
isEnabledbooleanrequiredIs the segment enabled.
typestringrequiredcountnumberFor id_list segments: the length of the ID list
rulesobject[]Rule Object
name[]stringrequiredThe name of this rule.
passPercentage[]numberrequiredOf the users that meet the conditions of this rule, what percent should return true.
conditions[]object[]requiredAn array of Condition objects.
targetValue[]oneOfoperator[]stringfield[]stringcustomID[]stringtype[]stringrequiredenvironments[]string[]The environments this rule is enabled for.
id[]stringThe Statsig ID of this rule.
baseID[]stringThe base ID of this rule, i.e. without any added metadata. Will remain the exact same throughout
returnValue[]objectThe return value of the rule.
tagsstring[]Optional tags for categorization.
idstringrequiredID
namestringOptional name for the configuration.
idTypestringrequiredType of ID
descriptionstringrequiredDetailed description of the configuration’s purpose.
lastModifierIDstringrequiredID of the last modifier.
lastModifiedTimenumberrequiredTime of the last modification.
lastModifierEmailstringrequiredEmail of the last modifier.
lastModifierNamestringrequiredName of the last modifier.
creatorIDstringrequiredID of the user who created the entity.
createdTimenumberrequiredTimestamp when the entity was created.
creatorNamestringrequiredName of the creator.
creatorEmailstringrequiredEmail of the creator.
targetAppsstring[]List of target applications associated with this configuration.
holdoutIDsstring[]Holdouts applied to this configuration.
teamstringOptional name for the responsible team.
teamIDstringOptional ID of the responsible team.
versionnumberVersion number
statusintegerrequiredmessagestringrequiredWas this helpful?