Create a segment

​

Body·

required
application/json

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.

Responses

  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for post/segment
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
  ]
}