v93

latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-01218121759.7 KB
Sequences

Cancel sequence enrollments

Cancels active or waiting 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

Path parameters

sequenceIdstring required

Sequence ID

Request body

cancelAllboolean

Cancel every active or waiting 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 or waiting 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."
}