Skip to main content
PATCH
Update Automation Step

Authorizations

Authorization
string
header
required

An Account API key, an App API key, an account access token, an account-scoped user token, or a user OAuth token. Prepend the key or token with Bearer, for example Bearer ***************************. See Auth & API keys for how to get each one.

Headers

Api-Version-Date
string

Pins the request to a dated API version.

Example:

"2026-11-05-1"

Path Parameters

id
string
required

Automation step ID, prefixed atos_.

Body

application/json
action_type
enum<string>

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.

Available options:
wait,
email,
message
Example:

"message"

config
Wait · object

The step's settings for its action_type: delay_seconds for a wait, and sender_id for an email or a message. Writing it replaces the whole object.

source_code
string | null

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, and reads the account through the whop client from whop:message, which can only read: it 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.

Example:

"export default () => message.send({ subject: \"Thanks!\", text: \"Thanks for your order!\" });"

Response

Automation step updated

action_type
enum<string>
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.

Available options:
wait,
email,
message
Example:

"email"

automation_id
string
required

ID of the automation the step belongs to, prefixed ato_.

Example:

"ato_xxxxxxxxxxxxxx"

config
Wait · object
required

The step's settings for its action_type: delay_seconds for a wait, sender_id for an email or message. Writing it replaces the whole object.

created_at
string
required

When the step was created, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

id
string
required

Automation step ID, prefixed atos_. A step gets a new ID in every version; key stays the same.

Example:

"atos_xxxxxxxxxxxxxx"

issues
string[]
required

What must be fixed before the draft can be published, such as code that hasn't been written. Empty when there's nothing.

key
integer
required

Identifies the same step across versions. A new step gets a key no step of the automation has used.

Example:

2

previous_step_id
string | null
required

ID of the step this one runs after, prefixed atos_. null when it runs first, directly after the member enrolls.

Example:

"atos_xxxxxxxxxxxxxx"

sender
Email address · object
required

The sender config.sender_id names. null on a wait, and when the step sends from the default sender.

source_code
string | null
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, and reads the account through the whop client from whop:message, which can only read: it 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.

Example:

"export default () => message.send({ subject: \"Thanks!\", text: \"Thanks for your order!\" });"

updated_at
string
required

When the step was last updated, as an ISO 8601 timestamp.

Example:

"2026-01-01T12:00:00.000Z"

version
integer
required

The automation version this step is part of. Only the draft version's steps can change.

Example:

1

waiting_enrollments_count
integer
required

Members on this step's version who are waiting for it to run.

Example:

0