Sequences

Cancel sequence enrollments

Changed on

Cancels active, waiting, or paused enrollments in one sequence. Target every enrollment with cancelAll, a batch with subscriberIds, one contact with subscriberId, or matching stored entry event property values with fieldValues. Bulk cancellation is capped at 1000 enrollments per request; repeat the request while remainingCount is above zero.

post/sequences/{sequenceId}/enrollments/cancel

Request

  • Base URL
    https://api.sequenzy.com/api/v1
  • URL
    https://api.sequenzy.com/api/v1/sequences/{sequenceId}/enrollments/cancel
  • Auth
    HTTP bearer

Path parameters

sequenceIdstring required

Sequence ID

Request body

cancelAllboolean

Cancel every active, waiting, or paused enrollment in the sequence, regardless of how contacts entered it. Use this when segment-triggered enrollments share no entry field value. Defaults to dry run unless dryRun is explicitly false.

subscriberIdstring

Subscriber ID to cancel in this sequence.

subscriberIdsstring[]

Up to 500 subscriber IDs to cancel in this sequence. IDs that do not resolve are returned in target.notFoundSubscriberIds. Defaults to dry run unless dryRun is explicitly false.

fieldPathstring

Dot-path inside the token's stored entry event properties. If omitted, the sequence enrollmentFieldPath is used.

fieldValuesstring[]

Entry field values to match.

dryRunboolean

When true, returns matching enrollments without cancelling them. cancelAll, subscriberIds, and fieldValues default to dry run unless explicitly false; a single subscriberId cancels immediately.

reasonstring

Optional reason stored on cancelled enrollment tokens.

Example request

{
  "cancelAll": true,
  "subscriberId": "sub_abc123",
  "subscriberIds": [
    "sub_abc123",
    "sub_def456"
  ],
  "fieldPath": "order.id",
  "fieldValues": [
    "ord_123",
    "ord_456"
  ],
  "reason": "Order cancelled"
}

Response

Enrollment cancellation completed or dry-run matches returned

successboolean
sequenceIdstring
dryRunboolean
targetobject
matchedCountnumber

Active, waiting, or paused enrollments matching the target when the request started.

cancelledCountnumber

Enrollments cancelled by this request. Bulk cancellation is capped at 1000 per request.

remainingCountnumber

Enrollments still matching the target after this request. Repeat the same request while this is above zero.

hasMoreboolean
messagestring

Example response

{
  "success": true,
  "sequenceId": "seq_abc123",
  "matchedCount": 2,
  "cancelledCount": 2,
  "enrollments": [
    {
      "tokenId": "tok_abc123",
      "subscriberId": "sub_abc123",
      "subscriberEmail": "customer@example.com",
      "status": "cancelled",
      "enrollmentKey": "event:ecommerce.order_placed:field:order.id:ord_123"
    }
  ],
  "message": "Cancelled 2 sequence enrollments."
}

Changes

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status

    • info

      added the optional property to the response with the status