Skip to main content

Workflow

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

Returned by DELETE /workflow, GET /workflow, POST /workflow, DELETE /workflow/:id, GET /workflow/:id, PUT /workflow/:id and 3 more.

Example​

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

{
"_id": "6a957378859eafb47bf2280d",
"name": "Welcome new website leads",
"company": "6a9572df859eafb47bf225d7",
"triggerEventType": "lead.created",
"status": "draft",
"publishedVersion": 0,
"latestVersion": 1,
"publishedSnapshot": null,
"schedule": {
"minute": "*",
"hour": "*",
"dayOfMonth": "*",
"month": "*",
"dayOfWeek": "*"
},
"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:40.441Z",
"updatedAt": "2026-08-31T12:28:40.441Z",
"__v": 0,
"nodes": [],
"edges": []
}

:::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
normalizedNamestring
activeNamestring
companyObjectId -> Companyrequired
triggerEventTypestring
statusstringdefault draft · one of draft, published, paused, archived
publishedVersionnumberdefault 0
latestVersionnumberdefault 1
configanydefault {}
publishedSnapshotanydefault null
publishedAtdate
schedule.minutestringdefault *
schedule.hourstringdefault *
schedule.dayOfMonthstringdefault *
schedule.monthstringdefault *
schedule.dayOfWeekstringdefault *
createdByObjectId -> Member
updatedByObjectId -> Member
_idObjectId
createdAtdateset once
updatedAtdate