Recommended Actions

Update Recommended Action

Changed on

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.

patch/recommended_actions/{id}

Request

  • Base URL
    https://api.whop.com/api/v1
  • Auth
    HTTP bearer

Path parameters

id, string required
Example:reca_xxxxxxxxxxxxx

Recommended action ID, prefixed reca_.

Headers

Api-Version-Date, string
Example:2026-11-30

Pins the request to a dated API version.

Request body

object required
workflow, object required

The action's workflow with the arguments to change.

Example request

{
  "workflow": {
    "steps": [
      {
        "arguments": {
          "id": "plan_xxxxxxxxxxxxxx",
          "visibility": "visible"
        },
        "operation": "updatePlan",
        "status": "pending",
        "title": "Offer the Interior Deep Clean package on the website"
      }
    ]
  }
}

Response

Action updated

RecommendedAction required
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.

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
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

Example response

{
  "account_id": "biz_xxxxxxxxxxxxxx",
  "created_at": "2026-01-01T12:00:00.000Z",
  "id": "reca_xxxxxxxxxxxxxx",
  "preview": {
    "changed_resources": [
      {
        "id": "plan_xxxxxxxxxxxxxx",
        "resource_type": "variant"
      }
    ],
    "type": "website_change"
  },
  "reasoning": "Visitors who reach your pricing section buy, but most leave the home page before they scroll to it.",
  "run_by_user_id": "user_xxxxxxxxxxxxxx",
  "run_started_at": "2026-01-01T12:00:00.000Z",
  "status": "running",
  "target_stats": [
    {
      "direction": "up",
      "estimate": 1240,
      "metric": "gross_revenue",
      "params": {
        "from": "2026-01-01",
        "product": "prod_xxxxxxxxxxxxxx",
        "to": "2026-01-01"
      }
    }
  ],
  "title": "Lead your home page with before and after detailing photos",
  "type": "improve_landing_page",
  "updated_at": "2026-01-01T12:00:00.000Z",
  "workflow": {
    "api_version": "2026-01-01",
    "steps": [
      {
        "arguments": {
          "id": "plan_xxxxxxxxxxxxxx",
          "visibility": "hidden"
        },
        "operation": "updatePlan",
        "status": "pending",
        "title": "Offer the Ceramic Coating Package on the website"
      }
    ]
  }
}

Changes

    • warning

      added the new create_message_automation enum value to the type response property for the response status

    • info

      removed the create_email_automation enum value from the type response property for the response status

    • 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

    1 more change in this revision