---
title: "Cancel Automation Enrollment"
method: POST
path: "/automation_enrollments/{id}/cancel"
tags: ["Automation Enrollments"]
---

# Cancel Automation Enrollment

`POST /automation_enrollments/{id}/cancel`

## Request

- Base URL: `https://api.whop.com/api/v1`
- URL: `https://api.whop.com/api/v1/automation_enrollments/{id}/cancel`
- Auth: HTTP bearer

Cancels an `active` enrollment: the member gets none of the automation's remaining steps, and their enrollment becomes `canceled`. The member can enroll in the automation again later.

## Path parameters

- `id` string, required

## Headers

- `Api-Version-Date` string
- `Idempotency-Key` string

## Response `200`

Automation enrollment canceled

- AutomationEnrollment
  - `account_id` string, required: ID of the account the automation belongs to, prefixed `biz_`.
  - `automation_id` string, required: ID of the automation, prefixed `ato_`.
  - `created_at` string, required: When the member enrolled, as an ISO 8601 timestamp.
  - `ended_at` string, nullable, required: When the enrollment ended, as an ISO 8601 timestamp. `null` while it's active.
  - `id` string, required: Automation enrollment ID, prefixed `atoe_`.
  - `member_id` string, required: ID of the member in the automation, prefixed `mber_`.
  - `next_run_at` string, nullable, required: When that step runs for this member, as an ISO 8601 timestamp. `null` once the enrollment ends.
  - `next_step_id` string, nullable, required: ID of that step in the member's version, prefixed `atos_`. `null` once the enrollment ends.
  - `next_step_key` integer, nullable, required: The `key` of the step the member is waiting on, in their version. `null` once the enrollment ends.
  - `status` 'active' | 'completed' | 'canceled', required: `active` while the member moves through the automation. `completed` after its last step. `canceled` when the account canceled the enrollment, or stopped or deleted the automation.
  - `trigger_event` 'payment.succeeded' | 'payment.failed' | 'membership.activated' | 'membership.trial_ending_soon' | 'membership.cancel_at_period_end_changed' | 'member.created' | 'invoice.created' | 'invoice.paid' | 'invoice.past_due' | 'refund.created' | 'dispute.created' | 'resolution_center_case.created' | 'resolution_center_case.decided' | 'course_lesson_interaction.completed' | 'null', nullable, required: The webhook event that enrolled the member. `null` when `POST /automations/{id}/trigger` enrolled them.
  - `trigger_resource_id` string, nullable, required: ID of the record the triggering event was about, such as a `pay_` payment or `mem_` membership. `null` when a trigger request enrolled them.
  - `updated_at` string, required: When the enrollment last changed, as an ISO 8601 timestamp.
  - `user_id` string, nullable, required: ID of the member's user, prefixed `user_`. `null` when the member is another business.
  - `version` integer, required: The automation version the member is on. It changes only when a publish moves members to the new version.

## Other responses

- `400`: Invalid Parameters
- `403`: Forbidden
- `404`: Resource not found
- `409`: Conflict

## Changes

- **2026-11-23** `d8628142e836`: 1 warning
  - added the new `membership.cancel_at_period_end_changed` enum value to the `trigger_event` response property for the response status `200`
- **2026-11-06** `ea41781067f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/whop/apis/whop-api/changes/automation_enrollments/:id/cancel/post.md)

---

[API](https://skmtc.dev/whop/apis/whop-api.md) - [All operations](https://skmtc.dev/whop/apis/whop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/whop/apis/whop-api/revisions/b10d1ab093e8?raw)
