Schedule campaign
Resolves the final recipient audience (filters + manual + imported − excluded), pre-computes and validates every contact’s template variables, persists one CampaignDispatches document per contact with campaignDispatchVariables already filled, and enqueues them to SQS in batch — replacing talqui-core-api’s campaignSchedule.js (which neither resolves nor validates variables, and relies on a 1000-per-5min poller to enqueue).
Authorizations
Behalf of an Operator (default). A JWT issued by Talqui Core when an operator signs in, scoped to every tenant that operator belongs to. Send as Authorization: Bearer <jwt-token>.
Body
When to start dispatching: ISO 8601 datetime with offset or Z. Omit/null for immediate dispatch; a value more than 5 minutes in the past is rejected.
^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z|([+-](?:[01]\d|2[0-3]):[0-5]\d)))$Contacts explicitly removed from the final audience.
Segment rules to resolve into recipients — same wire format as /contacts/segment.
Contacts resolved from a CSV import.
Contacts picked manually by the operator.
Value source per template variable key (from the campaign model catalog) — fixed or per-contact.
Response
Response for status 200.
Dispatches left pending for the watchdog poller to pick up (queue publish failed or unconfigured).
Dispatches successfully published to SQS in this request.
Recipients recorded as failed because a required template variable had no value for them.