Skip to main content
POST
/
api
/
v1
/
sequences
/
{sequenceId}
/
enrollments
/
cancel
Cancel Sequence Enrollments
curl --request POST \
  --url https://api.sequenzy.com/api/v1/sequences/{sequenceId}/enrollments/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "subscriberId": "<string>",
  "fieldPath": "<string>",
  "fieldValues": [
    {}
  ],
  "dryRun": true,
  "reason": "<string>"
}
'
{
  "success": true,
  "sequenceId": "seq_abc123",
  "dryRun": false,
  "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"
    }
  ],
  "hasMore": false,
  "message": "Cancelled 2 sequence enrollments."
}

Documentation Index

Fetch the complete documentation index at: https://docs.sequenzy.com/llms.txt

Use this file to discover all available pages before exploring further.

Cancel Sequence Enrollments

Cancel active or waiting enrollments in a single sequence. Target either one subscriber by subscriberId, or all enrollments whose stored entry event properties match fieldValues.

Request

sequenceId
string
required
Sequence ID.
subscriberId
string
Subscriber ID to cancel in this sequence. Provide subscriberId or fieldValues, not both.
fieldPath
string
Dot-path inside the token’s entry event properties, such as order.id or event.id. If omitted, the sequence’s enrollmentFieldPath is used.
fieldValues
array
Entry field values to match. Provide fieldValues or subscriberId, not both.
dryRun
boolean
When true, returns matching enrollments without cancelling them. Field-value targeting defaults to dry run unless you set dryRun to false.
reason
string
Optional reason stored on cancelled enrollment tokens.
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/enrollments/cancel" \
  -H "Authorization: Bearer seq_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "fieldPath": "order.id",
    "fieldValues": ["ord_123", "ord_456"],
    "dryRun": false,
    "reason": "Order cancelled"
  }'

Responses

{
  "success": true,
  "sequenceId": "seq_abc123",
  "dryRun": false,
  "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"
    }
  ],
  "hasMore": false,
  "message": "Cancelled 2 sequence enrollments."
}