Skip to main content

Segment

Stored in the segments collection. createdAt and updatedAt are maintained automatically.

Returned by GET /segment, POST /segment, GET /segment/:id, PUT /segment/:id, GET /segment/execute.

Example​

One real Segment as returned by GET /segment, taken from the data array. Recorded from a live response, so the defaults, denormalised snapshots and populated fields are the actual ones:

{
"_id": "6a95738b859eafb47bf22821",
"name": "Enterprise prospects",
"description": "Enterprise-tagged contacts not yet customers.",
"company": "6a9572df859eafb47bf225d7",
"filterType": "AND",
"filters": [],
"cachedCount": 3,
"isActive": true,
"type": "contact",
"createdBy": {
"_id": "6a9572df859eafb47bf225d9",
"name": "Docs Test User",
"email": "test@test.test",
"status": "owner"
},
"updatedBy": {
"_id": "6a9572df859eafb47bf225d9",
"name": "Docs Test User",
"email": "test@test.test",
"status": "owner"
},
"createdAt": "2026-08-31T12:28:59.904Z",
"updatedAt": "2026-08-31T12:28:59.922Z",
"__v": 0,
"lastRefreshed": "2026-08-31T12:28:59.922Z"
}

:::note Trimmed for reading A populated reference is shown by the fields that identify it rather than in full — it arrives as the entire referenced document. Long arrays are cut to the first two entries and marked, long strings are truncated, and any field that could carry a credential is dropped rather than masked. :::

Fields​

FieldTypeNotes
namestringrequired
descriptionstring
companyObjectId -> Company
filterTypestringdefault AND · one of AND, OR
filtersobject[]default []
filters.conditionTypestringdefault AND · one of AND, OR
filters.conditionsobject[]default []
filters.conditions.fieldIdstringrequired
filters.conditions.fieldTypestring
filters.conditions.dependencySelectionsanydefault {}
filters.conditions.operatorstringrequired · one of is, is not, contains, starts with, has all, has any, does not have, greater than and 8 more
filters.conditions.operatorsstring[]default []
filters.conditions.valueany
filters.conditions.sourceFieldIdstring
filters.conditions.nestedPathstring[]default []
filters.conditions.isNestedCustomFieldboolean
filters.conditions.parentCollectionTypestring
filters.conditions.pathLabelstring
filters.conditions.typestring
filters.conditions.panelstringdefault contact · one of contact, lead, productService
cachedCountnumberdefault 0
lastRefresheddate
isActivebooleandefault true
typestringdefault contact · one of contact, lead, product, service
createdByObjectId -> Member
updatedByObjectId -> Member
_idObjectId
createdAtdateset once
updatedAtdate