---
title: "Update Recommended Action"
method: PATCH
path: "/recommended_actions/{id}"
tags: ["Recommended Actions"]
---

# Update Recommended Action

`PATCH /recommended_actions/{id}`

## Request

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

Edits the arguments of a `ready` action's steps before it runs. Send the action's `workflow` back with one entry for each step, in the same order. An entry with `arguments` replaces that step's arguments. An entry without them leaves the step as it is. Only `arguments` can change. Other step fields can be sent back only with the values the action has. Changing the `kind` of the `createExperiment` step rewrites the steps around it: `beforeafter` publishes the change before measuring it, and `experiment` tests it on a share of visitors.

## Path parameters

- `id` string, required

## Headers

- `Api-Version-Date` string

## Request body

- object
  - `workflow` object, required: The action's workflow with the arguments to change.
    - `steps` object[], required: One entry for each step of the action, in the same order.
      - `arguments` object: The input of the operation under `api_version`. It holds the path, query and body parameters in one map. A value of the form `{{steps[<index>].<field>}}` reads a field from the response of an earlier step. `<index>` is that step's position in `steps`, counting from 0. The value is replaced before the step is sent.
      - `error` string, nullable: The step's error. It can't be changed.
      - `operation` string: The step's operation. It can't be changed.
      - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'skipped': The step's status. It can't be changed.
      - `title` string: The step's title. It can't be changed.

## Response `200`

Action updated

- RecommendedAction
  - `account_id` string, required: The account the action is for, prefixed `biz_`.
  - `created_at` string, required: When the action was created, as an ISO 8601 timestamp.
  - `experiment_id` string, nullable, required: The experiment measuring the action's outcome, prefixed `expt_`. `null` when there is none.
  - `id` string, required: Recommended action ID, prefixed `reca_`.
  - `preview` union, required: The website change a recommended action makes when it runs. `type` picks the shape. New types can be added, so skip a preview whose `type` you do not know.
    - RecommendedActionWebsiteChangePreview
      - `app_id` string, required: App ID of the website, prefixed `app_`.
      - `base_build_id` string, nullable, required: App build ID of the live build the draft was made from, prefixed `apbu_`. `null` when the website has no live build.
      - `changed_resources` RecommendedActionChangedResource[], required
        - `id` string, required: ID of the resource. A `variant` ID is prefixed `plan_` and a `promo_code` ID `promo_`.
        - `resource_type` 'variant' | 'promo_code', required: Type of the resource. New types can be added, so skip an entry whose `resource_type` you do not know.
      - `draft_build_id` string, required: App build ID of the drafted build, prefixed `apbu_`.
      - `page_paths` string[], required
      - `type` 'website_change', required: Always `website_change`. Running the action publishes the drafted build to every visitor.
    - RecommendedActionWebsiteAbTestPreview
      - `app_id` string, required: App ID of the website, prefixed `app_`.
      - `base_build_id` string, required: App build ID of the live build the draft is tested against, prefixed `apbu_`.
      - `changed_resources` RecommendedActionChangedResource[], required
        - `id` string, required: ID of the resource. A `variant` ID is prefixed `plan_` and a `promo_code` ID `promo_`.
        - `resource_type` 'variant' | 'promo_code', required: Type of the resource. New types can be added, so skip an entry whose `resource_type` you do not know.
      - `draft_build_id` string, required: App build ID of the drafted build, prefixed `apbu_`.
      - `page_paths` string[], required
      - `traffic_percent` integer, required: Percentage of visitors who see the drafted build during the test, such as `50`.
      - `type` 'website_ab_test', required: Always `website_ab_test`. Running the action tests the drafted build against the live build.
  - `reasoning` string, required: Why Whop recommends the action, written for the account owner.
  - `run_by_user_id` string, nullable, required: The user who ran the action, prefixed `user_`. `null` until the action runs.
  - `run_ended_at` string, nullable, required: When the run ended, as an ISO 8601 timestamp. `null` until the run ends.
  - `run_started_at` string, nullable, required: When the run started, as an ISO 8601 timestamp. `null` until the action runs.
  - `status` 'preparing' | 'ready' | 'running' | 'executed' | 'failed' | 'dismissed' | 'superseded', required: Where the action is. `preparing` while its work is built, and it cannot run yet. `ready` when it can run. `running` while its steps are sent. `executed` when every step succeeded. `failed` when the run ended before every step succeeded. `dismissed` when the owner chose not to run it. `superseded` when Whop retired it, such as for a newer action.
  - `target_stats` RecommendedActionStat[], required
    - `direction` 'up' | 'down', required: Which way the measure should move.
    - `estimate` number, nullable, required: The value the measure is expected to reach, in its own unit. `null` when there is no estimate.
    - `metric` string, required: The stats metric, the key of `GET /stats/time_series/{metric}`.
    - `params` object, required: The parameters of that metric beyond the account, as the stats API takes them.
  - `title` string, required: What the action does, written for the account owner.
  - `type` 'add_cancel_offer' | 'create_message_automation' | 'improve_landing_page' | 'fix_broken_website' | 'clone_and_ab_test_site', required: What kind of change the action makes. New values can be added, so skip an action whose type you do not know.
  - `updated_at` string, required: When the action was last updated, as an ISO 8601 timestamp.
  - `workflow` RecommendedActionWorkflow, nullable, required
    - `api_version` string, required: The `Api-Version-Date` every step is sent with, such as `2026-11-14`. The arguments of each step have the shape of this version.
    - `steps` RecommendedActionWorkflowStep[], required
      - `arguments` object, required: The input of the operation under `api_version`. It holds the path, query and body parameters in one map. A value of the form `{{steps[<index>].<field>}}` reads a field from the response of an earlier step. `<index>` is that step's position in `steps`, counting from 0. The value is replaced before the step is sent.
      - `error` string, nullable, required: Why the call did not go through. `null` when the step succeeded or was not sent.
      - `operation` string, required: The `operationId` of the API operation the step calls, such as `createExperiment`.
      - `status` 'pending' | 'running' | 'succeeded' | 'failed' | 'skipped', required: Where the step is in the run. `pending` until the run sends it. `skipped` means an earlier step failed, so this step was not sent.
      - `title` string, required: One sentence for the account owner about what the step changes, such as `Add a one-time wash button in the hero`.

## Other responses

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

## Changes

- **2026-11-24** `f16e7d5c8c19`: 1 warning, 1 info
  - added the new `create_message_automation` enum value to the `type` response property for the response status `200`
  - removed the `create_email_automation` enum value from the `type` response property for the response status `200`
- **2026-11-21** `2701bb897c6d`: 2 warning
  - added the new `promo_code` enum value to the `preview/oneOf[#/components/schemas/RecommendedActionPreview]/oneOf[#/components/schemas/RecommendedActionWebsiteAbTestPreview]/changed_resources/items/resource_type` response property for the response status `200`
  - added the new `promo_code` enum value to the `preview/oneOf[#/components/schemas/RecommendedActionPreview]/oneOf[#/components/schemas/RecommendedActionWebsiteChangePreview]/changed_resources/items/resource_type` response property for the response status `200`
- …earlier changes not shown

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