curl --request POST \
--url 'https://api.stateset.com/api/v1/segments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"segment_type": "string"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"member_count": 1,
"name": "Two-Person Tent",
"segment_type": "string"
}
Create a segment
Create a segment
POST
/
api
/
v1
/
segments
curl --request POST \
--url 'https://api.stateset.com/api/v1/segments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"segment_type": "string"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"member_count": 1,
"name": "Two-Person Tent",
"segment_type": "string"
}
Request body
CreateSegmentRequest
string,null
string
required
string,null
Response
SegmentResponse
string
required
string
required
integer (int64)
required
string
required
string
required
Status codes
| Code | Meaning |
|---|---|
201 | — |
400 | — |
curl --request POST \
--url 'https://api.stateset.com/api/v1/segments' \
--header "Authorization: Bearer $STATESET_API_KEY" \
--header 'Content-Type: application/json' \
--data '{
"description": "Two-person tent, green — replacement for damaged pole set.",
"name": "Two-Person Tent",
"segment_type": "string"
}'
{
"created_at": "2026-08-31T14:22:05Z",
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"member_count": 1,
"name": "Two-Person Tent",
"segment_type": "string"
}
Last modified on August 31, 2026