Campaign
Stored in the campaigns collection. createdAt and updatedAt are maintained automatically.
Returned by GET /campaign, GET /campaign/:id, PUT /campaign/:id, POST /campaign/:id/assignTag, PUT /campaign/:id/play-pause, GET /campaign/:id/recipients.
| Field | Type | Notes |
|---|---|---|
name | string | required |
description | string | default "" |
contacts | ObjectId[] -> Contact | default [] |
contactsCount | number | default 0 |
segments | ObjectId[] -> Segment | default [] |
customAudience | any | default null |
type | string | required · one of email, sms, whatsapp |
smtp | object | |
smtp.id | ObjectId | |
smtp.type | string | one of Smtp, Gmail, Ses, Sendgrid, Postmark, Brevo, Sparkpost, Elasticemail and 1 more |
smtp.customFromName | string | |
smtp.customFromEmail | string | |
smtp.customFromNameBool | boolean | default false |
smtp.customFromEmailBool | boolean | default false |
template | ObjectId | |
status | string | default draft · one of active, completed, draft, failed, paused, preparing, scheduled |
error | string | |
lockedAt | date | |
intervalMs | number | default 0 |
daysOfWeek | number[] | default [0,1,2,3,4,5,6] |
timeWindow.from | date | |
timeWindow.to | date | |
scheduleType | string | default immediate · one of immediate, scheduledForLater |
triggerWorkflow | boolean | default false |
startAt | date | |
nextRunAt | date | |
endAt | date | |
resumeIndex | number | default 0 |
failedContacts | ObjectId[] -> Contact | default [] |
failedContactsCount | number | default 0 |
sentContacts | ObjectId[] -> Contact | default [] |
sentContactsCount | number | default 0 |
skippedCount | number | default 0 |
messageIds | ObjectId[] | default [] |
messageIdType | string | one of SmtpMessage, GmailMessage, SmsMessage, WhatsAppMessage, SesMessage, SendgridMessage, PostmarkMessage, BrevoMessage and 3 more |
continuedTimes | number | default 0 |
engine | string | default legacy · one of legacy, v2 |
materializedAt | date | |
inFlightCeiling | number | default 2000 |
leaseBatchSize | number | default 500 |
throttlePerMinute | number | default 0 |
company | ObjectId -> Company | |
createdBy | ObjectId -> Member | |
updatedBy | ObjectId -> Member | |
unifiedKeyChanged | boolean | default false |
unifiedKeyChangedAt | date | |
segmentsBool | boolean | default false |
tagsBool | boolean | default false |
categoriesBool | boolean | default false |
contactsBool | boolean | default false |
_id | ObjectId | default "6a95712f932657988a91c06d" |
createdAt | date | set once |
updatedAt | date |