---
title: "Delete Automation Step"
method: DELETE
path: "/automation_steps/{id}"
tags: ["Automation Steps"]
---

# Delete Automation Step

`DELETE /automation_steps/{id}`

## Request

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

Deletes a step of the draft version. The step after it runs in its place. Members already in the automation aren't affected until the draft is published.

## Path parameters

- `id` string, required

## Headers

- `Api-Version-Date` string

## Response `200`

Automation step deleted

- AutomationStep
  - `action_type` 'wait' | 'email' | 'message', required: What the step does: `wait` holds the member for `config.delay_seconds`, `email` emails them, and `message` sends them a message from a team member. A draft step can switch between `email` and `message`, which clears `config.sender_id`. A `wait` can't become a sending step, or the other way round.
  - `automation_id` string, required: ID of the automation the step belongs to, prefixed `ato_`.
  - `config` union, required: The step's settings for its `action_type`: `delay_seconds` for a `wait`, and `sender_id` and `attachment_ids` for an `email` or `message`. Writing it replaces the whole object, except that a step keeps its `attachment_ids` when the write leaves them out.
    - AutomationStepWaitConfig
      - `delay_seconds` integer, required: Seconds the member waits before the next step, from 1 to 31,536,000 (365 days).
    - AutomationStepEmailConfig
      - `attachment_ids` string[]
      - `sender_id` string, nullable, required: The mailbox the email comes from, prefixed `emaddr_`: an email address on the account whose domain can send email. Naming one needs what `/email_addresses` asks to use it. `null` sends from the account's name through Whop.
    - AutomationStepMessageConfig
      - `attachment_ids` string[]
      - `sender_id` string, nullable, required: The team member the message comes from, as a user ID prefixed `user_`. Only that member can name themselves. `null` sends as the account owner.
  - `created_at` string, required: When the step was created, as an ISO 8601 timestamp.
  - `id` string, required: Automation step ID, prefixed `atos_`. A step gets a new ID in every version. Its `key` stays the same.
  - `issues` string[], required
  - `key` integer, required: Identifies the same step across versions. A new step gets a key no step of the automation has used.
  - `previous_step_id` string, nullable, required: ID of the step this one runs after, prefixed `atos_`. `null` when it runs first, directly after the member enrolls.
  - `purpose` 'transactional' | 'marketing' | 'null', nullable, required: Whether this step's message is `transactional` or `marketing`. `null` when its code is being classified.
  - `sender` union, required: Who a step's message comes from. `type` picks the shape: an `email_address` for an `email` step, a `user` on the team for a `message` step.
    - AutomationStepEmailAddressSender
      - `address` string, required: The address the email comes from, such as hello@example.com.
      - `id` string, required: Email address ID, prefixed `emaddr_`.
      - `type` 'email_address', required: Always `email_address`.
    - AutomationStepUserSender
      - `id` string, required: User ID of the team member the message comes from, prefixed `user_`.
      - `name` string, nullable, required: The team member's display name. `null` when they haven't set one.
      - `type` 'user', required: Always `user`.
      - `username` string, required: The team member's username.
  - `source_code` string, nullable, required: An `email` or `message` step's code: a TSX module whose default export gets the member and returns `message.send()`, `message.skip()` or `message.exit()` from `whop:message`. An `email` step sends its `subject`, its `react` element as the body and its `text` as the plain-text part. A `message` step sends its `text`. The code can import `react` and `@react-email/components`. It reads the account through the `whop` client from `whop:message`, which can only read. That client holds every account-level `:read` permission that both the admin role and Whop AI hold, except `payout:account:read`, as listed for previewing a step. Setting it, or previewing the step, needs every one of those permissions. Up to 64,000 characters. `null` on a `wait`, and until it is written.
  - `updated_at` string, required: When the step was last updated, as an ISO 8601 timestamp.
  - `version` integer, required: The automation version this step is part of. Only the draft version's steps can change.
  - `waiting_enrollments_count` integer, required: Members on this step's version who are waiting for it to run.

## Changes

- **2026-12-01** `70eea3d021d5`: 1 info
  - added the required property `purpose` to the response with the `200` status
- **2026-11-23** `d8628142e836`: 2 info
  - added the optional property `config/anyOf[subschema #2: Email]/attachment_ids` to the response with the `200` status
  - added the optional property `config/anyOf[subschema #3: Message]/attachment_ids` to the response with the `200` status
- **2026-11-21** `968f4fc221c1`: 2 breaking, 3 info
  - removed the required property `sender/oneOf[#/components/schemas/AutomationStepSender]/oneOf[subschema #1: Email address]/object` from the response with the `200` status
  - removed the required property `sender/oneOf[#/components/schemas/AutomationStepSender]/oneOf[subschema #2: User]/object` from the response with the `200` status
  - response discriminator property name changed for `sender/oneOf[#/components/schemas/AutomationStepSender]/` response property from `object` to `type` for the response status `200`
  - added the required property `sender/oneOf[#/components/schemas/AutomationStepSender]/oneOf[subschema #1: Email address]/type` to the response with the `200` status
  - …1 more
- **2026-11-06** `ea41781067f2`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/whop/apis/whop-api/changes/automation_steps/:id/delete.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)
