Skip to main content
PATCH
Update a segment

Authorizations

Authorization
string
header
required

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

Path Parameters

projectId
string
required

Project ID

id
string
required

Segment ID

Body

application/json
name
string
Minimum string length: 1
conditions
object[]

Replaces the conditions (condition segments only). Attribute conditions and groups only; top-level siblings are ANDed, wrap in a match:"any" group for OR — same rules as segment creation.

Response

Segment updated

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.