> ## 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 Audience Enrollment

> Stop a queued or running audience enrollment

Stop an audience enrollment run started with [Enroll Audience](/api-reference/sequences/enroll-audience). A queued run is cancelled immediately. A running run stops after the batch it is currently enrolling, so `status` stays `running` with `cancelRequestedAt` set until the worker observes the request.

Contacts already enrolled stay in the sequence. Use [Cancel Enrollments](/api-reference/sequences/cancel-enrollments) to remove them.

## Request

<ParamField path="sequenceId" type="string" required>
  Sequence ID.
</ParamField>

<ParamField path="runId" type="string" required>
  Audience enrollment run ID.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/sequences/seq_abc123/audience-enrollments/aer_abc123/cancel" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "audienceEnrollment": {
      "id": "aer_abc123",
      "sequenceId": "seq_abc123",
      "status": "cancelled",
      "audience": { "type": "all" },
      "targetNodeId": "node_delay_1",
      "estimatedCount": 12000,
      "processedCount": 0,
      "enrolledCount": 0,
      "skippedCount": 0,
      "source": "api",
      "error": null,
      "createdAt": "2026-11-01T10:00:00.000Z",
      "startedAt": null,
      "completedAt": "2026-11-01T10:00:20.000Z",
      "cancelRequestedAt": "2026-11-01T10:00:20.000Z"
    },
    "message": "Audience enrollment cancelled."
  }
  ```

  ```json 400 theme={null}
  {
    "error": "This enrollment is already completed"
  }
  ```

  ```json 401 theme={null}
  {
    "error": "Invalid API key"
  }
  ```

  ```json 404 theme={null}
  {
    "error": "Audience enrollment not found"
  }
  ```
</ResponseExample>
