Skip to main content
POST
Enroll Audience
Enroll a whole audience in a sequence. Unlike Enroll Subscribers, there is no 500-contact cap: Sequenzy starts a background run that walks the audience in batches and reports progress. This is how a manual-trigger countdown sequence, such as a Black Friday countdown, gets its audience: enable the sequence, then enroll the audience.
  • Only active contacts with an email address are enrolled. Unsubscribed and bounced contacts are never enrolled.
  • Contacts already active or waiting in the sequence are skipped. Sequences with enrollmentMode: "one_time" also skip contacts who completed or were cancelled before.
  • Late enrollees in a sequence with key-date waits skip the steps whose moment already passed and continue from the next wait (the step’s pastAction).
  • Only one run per sequence can be queued or running at a time.
  • The sequence must be enabled and accepting entrants.
Use POST /api/v1/sequences/{sequenceId}/enroll-audience/estimate with the same audience body to preview the counts without starting a run.

Request

string
required
Sequence ID.
object
required
Who to enroll. Same shape as campaign targetLists.
string | null
Step to start contacts at. Defaults to the first step after the trigger. Cannot be a trigger node.
string | null
ISO 8601 date-time to start the run later, up to one year ahead. The run is created with status: "queued" and scheduledFor set, and can be cancelled before it starts. A past value starts now.
object | null
Run-level data shared by everyone in this run, such as a sale end time, a discount percentage or an order cut-off time. Sequenzy stores it on the run and copies it into every enrolled contact’s sequence context at enrollment time, so the sequence’s emails and conditions read it as {{enrollment.<field>}} (nested paths such as {{enrollment.draw.date}} and {{#each enrollment.prizes}} work). Must be a JSON object of at most 8 KB, 100 top-level keys and 8 levels of nesting; keys named __proto__, constructor or prototype and strings containing NUL characters are rejected. Omit, null or {} for none. Contacts enrolled by a later run see that run’s data; contacts still active from an earlier run are skipped and keep the earlier run’s data. Contacts enrolled by an auto-enroll sync (audienceAutoEnroll) have no run data. Stored as JSONB, so key order is not preserved and numbers are normalized (1.0 reads back as 1).
To keep enrolling people who join the audience after this run (new list members, new segment matches) until the countdown ends, set audienceAutoEnroll on the sequence with Update Sequence.
With run-level data for a flash sale (every email in the run reads {{enrollment.sale_ends_at}} and {{enrollment.discount_percent}}):
Estimate first:

Responses

Failure and retry semantics

The run is idempotent per contact: the cursor is committed together with every batch of enrollments, so a retried worker resumes where it stopped and never enrolls the same contact twice. Every contact the run enrolls, in any batch or after a retry, receives the same copy of data. There is no way to change a run’s data afterwards; start a new run for new values. If the run fails after retries, its status becomes failed with an error, and the contacts enrolled before the failure stay in the sequence. Cancelling stops after the current batch and keeps everyone already enrolled.