Skip to main content
GET
Get a segment

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Segment ID

projectId
string
required

Project ID

Query Parameters

expand

Inline: memberCount (needs environmentId).

Available options:
memberCount
environmentId
string

Environment whose members to count (segment definitions are project-level, members are environment-scoped). Required with expand=memberCount.

Response

Segment found

id
string
required
object
enum<string>
required
Available options:
segment
name
string
required
bizType
enum<string>
required
Available options:
user,
company
kind
enum<string>
required

all = the built-in everyone segment (one per bizType; immutable, cannot be deleted); condition = membership computed from conditions; manual = explicit member list.

Available options:
all,
condition,
manual
createdAt
string<date-time>
required
updatedAt
string<date-time>
required
conditions
object[]

Present on condition segments (decompiled to stable attribute codes). Top-level siblings are ANDed; an OR lives inside a match:"any" group — same rules as writes.

memberCount
number

Members in the requested environment — only on GET one segment with expand=memberCount (+ environmentId); the list endpoint never returns it. manual = explicit members; condition = users/companies matching the conditions right now; all = everyone in the environment. Counted with the SAME filter the users/companies list applies for segmentId, so the two always agree.