Segment to create
Same shape as Segment, with
name,filterandmodulerequired - creating a segment without them is refused. A separate schema from Segment so that an update stays partial: reordering a segment is a PUT carrying nothing butorderIndex.- filterType: stringrequired
Filter expression selecting the records that belong to this segment. Not JSON - it is the same string grammar as the
filterquery parameter of the record list endpoints, documented there in full:field operator valueterms joined with&/;(AND) or|(OR), groups in parentheses, and the same operators (=,!=,>,>=,<,<=,~/!~LIKE with%wildcards,...for an IN set). Example:(name~%acme%&statusId...1,2,3)|spaceId=5. - moduleType: stringrequired
Module this segment applies to (e.g. 'contact', 'deal'); must match a value from the modules table
- nameType: stringrequired
Name of the Segment
- categoriesType: array of integer
Category IDs the segment is assigned to. Part of the segment's audience - see
users. - createdType: stringFormat: date-timeread-only
Creation timestamp
- createdType: integer
User Id read-onlyID of user who created this record
- customType: integer
Module Id ID of the custom module when the segment targets a custom module instead of a built-in one
- descriptionType: string
More detailed description of segment
- idType: integerread-only
Unique identifier - primary key
- orderType: integer
Index Numeric position used to sort segments in the UI
- teamsType: array of integer
Team IDs the segment is assigned to. Part of the segment's audience - see
users. - updatedType: stringFormat: date-timeread-only
Last edit timestamp
- updatedType: integer
User Id read-onlyID of the user who last edited this record
- usersType: array of integer
User IDs the segment is assigned to. Part of the segment's audience together with
teamsandcategories: leaving all three empty makes the segment readable by everyone and editable or deletable only by an administrator, while any non-empty audience restricts it to its members.