curl --request POST \
--url https://statsigapi.net/console/v1/segments \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"type": "id_list",
"id": "<string>",
"description": "<string>",
"idType": "userID",
"tags": [
"<string>"
],
"creatorID": "<string>",
"creatorEmail": "<string>",
"team": "<string>",
"teamID": "<string>",
"rules": [
{
"name": "<string>",
"passPercentage": 50,
"conditions": [
{
"type": "app_version",
"targetValue": [
"<string>"
],
"operator": "<string>",
"field": "<string>",
"customID": "<string>"
}
],
"environments": [
"<string>"
],
"id": "<string>",
"baseID": "<string>",
"returnValue": {}
}
]
}
'{
"message": "Segment created successfully.",
"data": {
"id": "an_id_list",
"isEnabled": true,
"description": "helpful summary of what this segment is",
"lastModifierName": "CONSOLE API",
"lastModifierID": "ahKwUoaNauHu9AmJPc2",
"type": "id_list",
"count": 0,
"tags": [
"a tag"
]
}
}curl --request POST \
--url https://statsigapi.net/console/v1/segments \
--header 'Content-Type: application/json' \
--header 'STATSIG-API-KEY: <api-key>' \
--data '
{
"name": "<string>",
"type": "id_list",
"id": "<string>",
"description": "<string>",
"idType": "userID",
"tags": [
"<string>"
],
"creatorID": "<string>",
"creatorEmail": "<string>",
"team": "<string>",
"teamID": "<string>",
"rules": [
{
"name": "<string>",
"passPercentage": 50,
"conditions": [
{
"type": "app_version",
"targetValue": [
"<string>"
],
"operator": "<string>",
"field": "<string>",
"customID": "<string>"
}
],
"environments": [
"<string>"
],
"id": "<string>",
"baseID": "<string>",
"returnValue": {}
}
]
}
'{
"message": "Segment created successfully.",
"data": {
"id": "an_id_list",
"isEnabled": true,
"description": "helpful summary of what this segment is",
"lastModifierName": "CONSOLE API",
"lastModifierID": "ahKwUoaNauHu9AmJPc2",
"type": "id_list",
"count": 0,
"tags": [
"a tag"
]
}
}Optional header to respect review settings for mutation endpoints.
name of the segment
3 - 100type of the segment
id_list, rule_based, analysis_list optional id of the segment (defaults to name)
3 - 100description of the segment
1000type of id
optional tags for categorization
the Statsig ID of the creator of this experiment
the email of the creator of this experiment
optional name identifier for the responsible team (enterprise only)
optional identifier for the responsible team (enterprise only)
Rule Object
Show child attributes