---
title: "Realign waiting enrollments to the sending window"
method: POST
path: "/sequences/{sequenceId}/enrollments/realign-sending-window"
tags: ["Sequences"]
---

# Realign waiting enrollments to the sending window

`POST /sequences/{sequenceId}/enrollments/realign-sending-window`

Pulls waiting enrollments forward to the start of the sequence sending window on the day they are already scheduled for. Changing a sending window leaves existing waits alone, so a widened window never reaches contacts already parked on an email-bound delay step and a narrowed one defers them to the next allowed day. Sequence windows never advance SMS, webhooks, branches, or other non-email actions. A wait only ever moves earlier, never onto a different local day, and never before now. Nobody is cancelled or re-enrolled. Defaults to a synchronous dry run; set dryRun false to queue a background apply job, then poll its status endpoint. Each job is capped at 1000 enrollments; when the completed result has hasMore true, pass nextCursor as cursor on the next request.

## Path parameters

- `sequenceId` string, required

## Request body

- SequenceEnrollmentRealignRequest — All fields are optional. With no body, every waiting enrollment in the sequence is previewed.
  - `nodeIds` string[] — Step IDs to limit realignment to. Defaults to every step.
  - `subscriberIds` string[] — Up to 500 subscriber IDs to limit realignment to. Defaults to every waiting contact.
  - `cursor` string — Opaque continuation cursor. When a response has hasMore true, pass its nextCursor here to continue after the enrollments already scanned.
  - `dryRun` boolean — When true (the default), returns the new wait times without writing them. Set false to apply.

## Response `200`

Dry-run preview

- SequenceEnrollmentRealignResponse
  - `success` boolean
  - `sequenceId` string
  - `sequenceName` string
  - `dryRun` boolean
  - `sendingWindow` object, nullable — The sequence sending window realignment anchored on, or null when only per-step weekday gates applied.
  - `scannedCount` number — Waiting enrollments inspected by this request.
  - `realignedCount` number — Waiting enrollments moved earlier, or that would move on a dry run. Capped at 1000 per request.
  - `unchangedCount` number
  - `unchangedReasons` object — Counts per reason an enrollment did not move: already_at_window_start, already_due, day_not_allowed, no_shared_opening, no_window, not_email_bound, send_retry, raced.
  - `requeueFailedCount` number — Enrollments whose new wait time was stored but whose wake-up could not be re-queued. The stuck-enrollment sweeper recovers these within a few minutes.
  - `changes` object[] — Sample of up to 50 realigned enrollments.
    - `enrollmentId` string
    - `subscriberId` string
    - `subscriberEmail` string, nullable
    - `currentNodeId` string
    - `waitUntil` string, date-time
    - `newWaitUntil` string, date-time
    - `movedEarlierMinutes` number
  - `hasMore` boolean — True when a per-request cap stopped the scan early. Continue with nextCursor while this is true.
  - `nextCursor` string — Opaque continuation cursor to pass as cursor on the next request when hasMore is true.
  - `maxRealignmentsPerRequest` number
  - `message` string

## Other responses

- `202` — Applied realignment queued
- `400` — Validation error
- `401` — Unauthorized
- `403` — No company selected or missing the sequences:enroll scope
- `404` — Sequence not found

---

[API](https://skmtc.net/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.net/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/fc5624c7d57a/schema)
