Create a segment
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Project ID
Body
Segment name.
1What the segment groups: user or company. Immutable.
user, company Segment kind. Immutable.
condition, manual Membership conditions (condition segments only) — ATTRIBUTE conditions and groups of them, nothing else (a segment is an attribute query). Multiple top-level conditions are ANDed — [A, B] means A AND B; for OR wrap them in one { "type": "group", "match": "any", "conditions": [A, B] }, same as content rules. For "users who did X" audiences, store the fact as an attribute too and segment on that, or put the event condition on the content's start rules.
- Option 1
- Option 2
- Option 3
Response
Segment created
segment user, company all = the built-in everyone segment (one per bizType; immutable, cannot be deleted); condition = membership computed from conditions; manual = explicit member list.
all, condition, manual 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.
- Option 1
- Option 2
- Option 3
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.