Promote an arm of a widget experiment
Puts the version of one arm of the running experiment live on its widget, through the same path as going live, and ends the experiment as promoted. When the two arms were two widgets, the other widget is taken offline. The body names the arm, `a` or `b`: usually the winner. This changes what shoppers are served, whatever the verdict says. `widget_experiment_not_running` when the experiment already ended. Records `engagement_widget.experiment_promoted` and the go-live's own audit entries, attributed to the API key. The widget in the path may be the widget of either arm; any other widget is a `404`.
ApiKeyAuthAuthorizationBearer <token>A WorkOS org-scoped API key, created from the dashboard's organization settings page. Identifies the tenant every read and write is scoped to. Missing, malformed, unknown, revoked, expired, or non-organization-owned keys all return 401 (no distinction, so the response can't be used to probe which keys or org ids exist).
siteId*stringThe site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.
widgetId*stringThe widget id (prefixed ewgt_). For an experiment it may be the widget of either arm.
experimentId*stringThe widget experiment id (prefixed ewxp_). An experiment the path widget is not an arm of, or of another organization, is a 404.
application/json- body
A body that names anything else, or no arm, is refused with 400.
arm*stringThe arm whose version goes live.
"a""b"The experiment, now promoted.
application/json- response
data*A widget A/B test with its per-arm counts and verdict.
curl -X POST 'https://example.com/api/v1/sites/string/engagement-widgets/string/experiments/string/promote' \ -H 'Content-Type: application/json' \ -d '{ "arm": "b"}'{ "data": { "id": "ewxp_01kvnwmagvf27rc9cze5rm9e1r", "status": "promoted", "endedReason": "promoted", "startedAt": "2026-11-02T09:30:00.000Z", "endedAt": "2026-11-05T10:00:00.000Z", "floorPerArm": 2400, "splitPercent": 50, "arms": [ { "arm": "a", "widgetId": "ewgt_01kvnwmagvf27rc9cze5rm9e1r", "versionId": "ewgv_01kvnwmagvf27rc9cze5rm9e1r", "assignedSessions": 2610, "startedSessions": 402, "startRate": 0.15402298850574714 }, { "arm": "b", "widgetId": "ewgt_01kvnwmagwf27rc9d7zef4qksf", "versionId": "ewgv_01kvnwmagwf27rc9d7zef4qksf", "assignedSessions": 2584, "startedSessions": 431, "startRate": 0.16679566563467493 } ], "verdict": { "state": "conclusive", "winner": "b" } }}Stop a widget experiment
Stops a running experiment: new sessions are served the live versions again, the sessions already assigned keep their arm, the widgets the start took offline come back, and the counts stay readable with `GET /experiments/{experimentId}`. The live versions stay live. `widget_experiment_not_running` when the experiment already ended. The body is empty. Records an audit entry (`engagement_widget.experiment_stopped`) attributed to the API key. The widget in the path may be the widget of either arm; any other widget is a `404`.
List the widgets and versions a test can use
Returns the widgets of the site and, for each, the saved versions that can be an arm of an A/B test (the latest saved state of each version, so a version tested before is listed too), and whether a running test holds the widget. These are the ids to send to `POST /engagement-widgets/{widgetId}/experiments`.