Reference / Segments

Add members to a segment

add_to_segmentocmgr segments addPOST /v1/segments/{id}/membersWRITE

Put people in a segment explicitly. Explicit membership is kept separately from the saved filter and is never recomputed away, which is what makes "add this person to the champions list" mean something when no filter could express why. Adding somebody already in it is not an error. Select by member_ids, filter (the search/export filters), all:true, or a CSV connection_id; at most 10,000 people. dry_run previews and rolls back every change.

Parameters

segmentstringREQUIRED

A segment, by name (case-insensitively) or by id.

connection_idstring (uuid)

Add this CSV connection, at most 10,000 people.

member_idsstring (uuid)[]up to 10000
filterobject

Select all search matches, up to 10,000. Defaults to community only.

has_notesboolean
querystring

Free text over name, handle, company and email.

source"self" | "github" | "slack" | "discourse" | "vanilla" | "bevy" | "gainsight-cc" | "gradual" | "bettermode" | "circle" | "flarum" | "verint" | "dev" | "stackoverflow" | "meetup" | "luma" | "discord" | "generic" | "csv" | "enrichment"

Only members with an identity on this source.

connectionstring (uuid)

Only members with an account on this connection.

companystring

Only members whose golden record names this company.

contributed_sincestring (date-time)

An activity initiated since this instant; excludes reactions, joins, presence and profile updates.

seen_sincestring (date-time)

Latest identity last_seen at or after this instant: profile observation and activity timestamps (including reactions/joins); excludes presence. Use contact.last_visited or list_presence for visits.

teamboolean | "all"

Defaults to false (community only). true selects staff only; "all" includes everyone.

tagsstring[]

Only members carrying one of these tags.

organisationstring

Only members in this organisation, by key or id.

segmentstring

Only the people in this segment now, by id or by name: the set its memberCount counts.

filterobject

A filter tree in the segment language, compiled by the same compiler preview_segment uses. An invalid tree is refused as USAGE naming the path.

show_snoozedboolean

With segment, include members whose snoozed_until is in the future. False by default.

segment_statusstring

With segment: only the people whose status in that segment is this key — the same narrowing search_members takes, so an export is what the table showed. Refused as USAGE without segment.

allboolean

Select the whole community, at most 10,000 people.

dry_runboolean

Return the real selection and changes, then roll back every write.

CLI flags

--filter <json>

Select all matching members, up to 10,000; see segments fields

--query <text>

Select by name, handle, email or company

--source <kind>

Select members with an account on this source kind

--connection <id>

Select members with an account on this connection

--company <name>

Select by profile company

--tag <name...>

Select members carrying these tags

--organisation <key>

Select by organisation key or ID

--segment <id-or-name>

Select the people in this segment

--seen-since <date>

Select by last seen date

--contributed-since <date>

Select by activity date

--teamdefault

Include staff in a filter selection

--no-team

Exclude staff (the default)

--only-team

Select staff only

--all

Select the whole community, up to 10,000

Also in Segments