Skip to main content
POST
Create Segment

Authorizations

STATSIG-API-KEY
string
header
required

Headers

x-respect-review-settings
string

Optional header to respect review settings for mutation endpoints.

Body

application/json
name
string
required

name of the segment

Required string length: 3 - 100
Pattern: ^[a-zA-Z0-9_\- ]*$
type
enum<string>
required

type of the segment

Available options:
id_list,
rule_based,
analysis_list
id
string

optional id of the segment (defaults to name)

Required string length: 3 - 100
Pattern: ^[a-zA-Z0-9_-]*$
description
string

description of the segment

Maximum string length: 1000
idType
string
default:userID

type of id

tags
string[]

optional tags for categorization

creatorID
string | null

the Statsig ID of the creator of this experiment

creatorEmail
string | null

the email of the creator of this experiment

team
string | null

optional name identifier for the responsible team (enterprise only)

teamID
string | null

optional identifier for the responsible team (enterprise only)

rules
object[]

Rule Object

Response

Create Segment Success

message
string
required

A simple string explaining the result of the operation.

data
object
required

A single result.