Create a segment
Body·
Segment to be created. Administrator only - membership in a segment audience does not grant creation.
Same shape as Segment, with name, filter and module required - 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 but orderIndex.
- Type: stringfilterrequired
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. - Type: stringmodulerequired
Module this segment applies to (e.g. 'contact', 'deal'); must match a value from the modules table
- Type: stringnamerequired
Name of the Segment
- Type: array of integercategories
Category IDs the segment is assigned to. Part of the segment's audience - see
users. - Type: integercustom
Module Id ID of the custom module when the segment targets a custom module instead of a built-in one
- Type: stringdescription
More detailed description of segment
- Type: integerorder
Index Numeric position used to sort segments in the UI
- Type: array of integerteams
Team IDs the segment is assigned to. Part of the segment's audience - see
users. - Type: array of integerusers
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.
Responses
- application/json
- application/json
- application/json
- application/json
- application/json
- application/json
curl https://test.boost.space/api/segment \
--request POST \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"id": 42,
"created": "2026-01-15T09:30:00Z",
"createdUserId": 42,
"updated": "2026-01-15T09:30:00Z",
"updatedUserId": 42,
"name": "Sample name",
"description": "string",
"filter": "string",
"module": "string",
"orderIndex": 1,
"customModuleId": 42,
"users": [
1
],
"teams": [
1
],
"categories": [
1
]
}'
{
"id": 42,
"created": "2026-01-15T09:30:00Z",
"createdUserId": 42,
"updated": "2026-01-15T09:30:00Z",
"updatedUserId": 42,
"name": "Sample name",
"description": "string",
"filter": "string",
"module": "string",
"orderIndex": 1,
"customModuleId": 42,
"users": [
1
],
"teams": [
1
],
"categories": [
1
]
}