curl --request PATCH \
--url https://api.whop.com/api/v1/recommended_actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow": {
"steps": [
{
"arguments": {
"account_id": "biz_xxxxxxxxxxxxxx",
"bucket_by": "anonymous",
"control": {
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
}
},
"flag_key": "ei_home_page_results",
"hypothesis": "If we make this change to the website for visitors, then more of them will buy.",
"metadata": {
"page_paths": "/"
},
"name": "Member results first",
"related_resource": {
"id": "app_xxxxxxxxxxxxxx",
"object": "app"
},
"variants": [
{
"name": "ei_change",
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
},
"weight": 50
}
]
},
"error": null,
"operation": "createExperiment",
"status": "pending",
"title": "Start the A/B test"
}
]
}
}
'import requests
url = "https://api.whop.com/api/v1/recommended_actions/{id}"
payload = { "workflow": { "steps": [
{
"arguments": {
"account_id": "biz_xxxxxxxxxxxxxx",
"bucket_by": "anonymous",
"control": { "related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
} },
"flag_key": "ei_home_page_results",
"hypothesis": "If we make this change to the website for visitors, then more of them will buy.",
"metadata": { "page_paths": "/" },
"name": "Member results first",
"related_resource": {
"id": "app_xxxxxxxxxxxxxx",
"object": "app"
},
"variants": [
{
"name": "ei_change",
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
},
"weight": 50
}
]
},
"error": None,
"operation": "createExperiment",
"status": "pending",
"title": "Start the A/B test"
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow: {
steps: [
{
arguments: {
account_id: 'biz_xxxxxxxxxxxxxx',
bucket_by: 'anonymous',
control: {related_resource: {id: 'apbu_xxxxxxxxxxxxxx', object: 'app_build'}},
flag_key: 'ei_home_page_results',
hypothesis: 'If we make this change to the website for visitors, then more of them will buy.',
metadata: {page_paths: '/'},
name: 'Member results first',
related_resource: {id: 'app_xxxxxxxxxxxxxx', object: 'app'},
variants: [
{
name: 'ei_change',
related_resource: {id: 'apbu_xxxxxxxxxxxxxx', object: 'app_build'},
weight: 50
}
]
},
error: null,
operation: 'createExperiment',
status: 'pending',
title: 'Start the A/B test'
}
]
}
})
};
fetch('https://api.whop.com/api/v1/recommended_actions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/recommended_actions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => [
'steps' => [
[
'arguments' => [
'account_id' => 'biz_xxxxxxxxxxxxxx',
'bucket_by' => 'anonymous',
'control' => [
'related_resource' => [
'id' => 'apbu_xxxxxxxxxxxxxx',
'object' => 'app_build'
]
],
'flag_key' => 'ei_home_page_results',
'hypothesis' => 'If we make this change to the website for visitors, then more of them will buy.',
'metadata' => [
'page_paths' => '/'
],
'name' => 'Member results first',
'related_resource' => [
'id' => 'app_xxxxxxxxxxxxxx',
'object' => 'app'
],
'variants' => [
[
'name' => 'ei_change',
'related_resource' => [
'id' => 'apbu_xxxxxxxxxxxxxx',
'object' => 'app_build'
],
'weight' => 50
]
]
],
'error' => null,
'operation' => 'createExperiment',
'status' => 'pending',
'title' => 'Start the A/B test'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/recommended_actions/{id}"
payload := strings.NewReader("{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.whop.com/api/v1/recommended_actions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/recommended_actions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"account_id": "biz_xxxxxxxxxxxxxx",
"created_at": "2026-01-01T12:00:00.000Z",
"id": "reca_xxxxxxxxxxxxxx",
"preview": {
"app_id": "<string>",
"base_build_id": "<string>",
"changed_resources": [
{
"id": "<string>",
"object": "variant"
}
],
"draft_build_id": "<string>",
"page_paths": [
"<string>"
],
"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_ended_at": null,
"run_started_at": "2026-01-01T12:00:00.000Z",
"status": "running",
"title": "Lead your home page with member results",
"type": "improve_landing_page",
"updated_at": "2026-01-01T12:00:00.000Z",
"workflow": {
"api_version": "2026-01-01",
"steps": [
{
"arguments": {
"id": "{{steps[0].id}}"
},
"error": null,
"operation": "activateExperiment",
"status": "pending",
"title": "Start the A/B test"
}
]
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Update Recommended Action
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.
curl --request PATCH \
--url https://api.whop.com/api/v1/recommended_actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"workflow": {
"steps": [
{
"arguments": {
"account_id": "biz_xxxxxxxxxxxxxx",
"bucket_by": "anonymous",
"control": {
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
}
},
"flag_key": "ei_home_page_results",
"hypothesis": "If we make this change to the website for visitors, then more of them will buy.",
"metadata": {
"page_paths": "/"
},
"name": "Member results first",
"related_resource": {
"id": "app_xxxxxxxxxxxxxx",
"object": "app"
},
"variants": [
{
"name": "ei_change",
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
},
"weight": 50
}
]
},
"error": null,
"operation": "createExperiment",
"status": "pending",
"title": "Start the A/B test"
}
]
}
}
'import requests
url = "https://api.whop.com/api/v1/recommended_actions/{id}"
payload = { "workflow": { "steps": [
{
"arguments": {
"account_id": "biz_xxxxxxxxxxxxxx",
"bucket_by": "anonymous",
"control": { "related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
} },
"flag_key": "ei_home_page_results",
"hypothesis": "If we make this change to the website for visitors, then more of them will buy.",
"metadata": { "page_paths": "/" },
"name": "Member results first",
"related_resource": {
"id": "app_xxxxxxxxxxxxxx",
"object": "app"
},
"variants": [
{
"name": "ei_change",
"related_resource": {
"id": "apbu_xxxxxxxxxxxxxx",
"object": "app_build"
},
"weight": 50
}
]
},
"error": None,
"operation": "createExperiment",
"status": "pending",
"title": "Start the A/B test"
}
] } }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
workflow: {
steps: [
{
arguments: {
account_id: 'biz_xxxxxxxxxxxxxx',
bucket_by: 'anonymous',
control: {related_resource: {id: 'apbu_xxxxxxxxxxxxxx', object: 'app_build'}},
flag_key: 'ei_home_page_results',
hypothesis: 'If we make this change to the website for visitors, then more of them will buy.',
metadata: {page_paths: '/'},
name: 'Member results first',
related_resource: {id: 'app_xxxxxxxxxxxxxx', object: 'app'},
variants: [
{
name: 'ei_change',
related_resource: {id: 'apbu_xxxxxxxxxxxxxx', object: 'app_build'},
weight: 50
}
]
},
error: null,
operation: 'createExperiment',
status: 'pending',
title: 'Start the A/B test'
}
]
}
})
};
fetch('https://api.whop.com/api/v1/recommended_actions/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.whop.com/api/v1/recommended_actions/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'workflow' => [
'steps' => [
[
'arguments' => [
'account_id' => 'biz_xxxxxxxxxxxxxx',
'bucket_by' => 'anonymous',
'control' => [
'related_resource' => [
'id' => 'apbu_xxxxxxxxxxxxxx',
'object' => 'app_build'
]
],
'flag_key' => 'ei_home_page_results',
'hypothesis' => 'If we make this change to the website for visitors, then more of them will buy.',
'metadata' => [
'page_paths' => '/'
],
'name' => 'Member results first',
'related_resource' => [
'id' => 'app_xxxxxxxxxxxxxx',
'object' => 'app'
],
'variants' => [
[
'name' => 'ei_change',
'related_resource' => [
'id' => 'apbu_xxxxxxxxxxxxxx',
'object' => 'app_build'
],
'weight' => 50
]
]
],
'error' => null,
'operation' => 'createExperiment',
'status' => 'pending',
'title' => 'Start the A/B test'
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.whop.com/api/v1/recommended_actions/{id}"
payload := strings.NewReader("{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.whop.com/api/v1/recommended_actions/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.whop.com/api/v1/recommended_actions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"workflow\": {\n \"steps\": [\n {\n \"arguments\": {\n \"account_id\": \"biz_xxxxxxxxxxxxxx\",\n \"bucket_by\": \"anonymous\",\n \"control\": {\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n }\n },\n \"flag_key\": \"ei_home_page_results\",\n \"hypothesis\": \"If we make this change to the website for visitors, then more of them will buy.\",\n \"metadata\": {\n \"page_paths\": \"/\"\n },\n \"name\": \"Member results first\",\n \"related_resource\": {\n \"id\": \"app_xxxxxxxxxxxxxx\",\n \"object\": \"app\"\n },\n \"variants\": [\n {\n \"name\": \"ei_change\",\n \"related_resource\": {\n \"id\": \"apbu_xxxxxxxxxxxxxx\",\n \"object\": \"app_build\"\n },\n \"weight\": 50\n }\n ]\n },\n \"error\": null,\n \"operation\": \"createExperiment\",\n \"status\": \"pending\",\n \"title\": \"Start the A/B test\"\n }\n ]\n }\n}"
response = http.request(request)
puts response.read_body{
"account_id": "biz_xxxxxxxxxxxxxx",
"created_at": "2026-01-01T12:00:00.000Z",
"id": "reca_xxxxxxxxxxxxxx",
"preview": {
"app_id": "<string>",
"base_build_id": "<string>",
"changed_resources": [
{
"id": "<string>",
"object": "variant"
}
],
"draft_build_id": "<string>",
"page_paths": [
"<string>"
],
"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_ended_at": null,
"run_started_at": "2026-01-01T12:00:00.000Z",
"status": "running",
"title": "Lead your home page with member results",
"type": "improve_landing_page",
"updated_at": "2026-01-01T12:00:00.000Z",
"workflow": {
"api_version": "2026-01-01",
"steps": [
{
"arguments": {
"id": "{{steps[0].id}}"
},
"error": null,
"operation": "activateExperiment",
"status": "pending",
"title": "Start the A/B test"
}
]
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}{
"error": {
"message": "account_id is required",
"type": "bad_request",
"code": "<string>"
}
}Authorizations
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.
Body
Response
Action updated
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.
preparing, ready, running, executed, failed, dismissed, superseded "running"

