Skip to Content
iAdvizeDocs

List a widget's experiments

Returns a summary of the A/B tests where the widget is the widget of either arm, newest first, at most 50: the status, when it started and ended, why it ended, the floor, the split and the two arms (each with its widget and version). It carries no count and no verdict: read one experiment with `GET /experiments/{experimentId}`.

GET
/api/v1/sites/{siteId}/engagement-widgets/{widgetId}/experiments

Authorization

ApiKeyAuth
headerAuthorizationBearer <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).

Path Parameters

siteId*string

The site id (prefixed site_). A site id that isn't yours is a 404, same as any other cross-tenant id.

widgetId*string

The widget id (prefixed ewgt_). For an experiment it may be the widget of either arm.

Response Body

The widget's experiments, empty when it never had one.

application/json
  1. response
data*array<>
Example Request
curl -X GET 'https://example.com/api/v1/sites/string/engagement-widgets/string/experiments'
Example Response
{  "data": [    {      "id": "ewxp_01kvnwmagvf27rc9cze5rm9e1r",      "status": "running",      "endedReason": null,      "startedAt": "2026-11-02T09:30:00.000Z",      "endedAt": null,      "floorPerArm": 2400,      "splitPercent": 50,      "arms": [        {          "arm": "a",          "widgetId": "ewgt_01kvnwmagvf27rc9cze5rm9e1r",          "versionId": "ewgv_01kvnwmagvf27rc9cze5rm9e1r"        },        {          "arm": "b",          "widgetId": "ewgt_01kvnwmagwf27rc9d7zef4qksf",          "versionId": "ewgv_01kvnwmagwf27rc9d7zef4qksf"        }      ]    }  ]}

Get a holdout test in detail

Returns one holdout test of the site with what the test view shows: its reading (`analysis.result`, with the effect and its always-valid `interval` once both groups reach the floor), the fixed-sentence `summary`, the add-to-cart events and the value added to carts per group and currency (median and mean per session with a cart, descriptive, never revenue), the effect by device (a lead, never a verdict; `sameSign` counts the site's other tests that reached the floor), the sessions per hour and the cumulative share every 6 hours, what the group with the agent did (funnel, widgets, starter questions, conversations by type and resolution), the checks on its validity (the split with its p-value, the pixel, widgets that did not show, an early stop) and the audited changes made while it ran. Only changes made through the dashboard, the REST API or the MCP server are audited, so `changes` is a floor, never proof that nothing else changed. `analysis` is `null` for an invalidated test. `404` for a test that does not exist, belongs to another site or to another organization.

Start a widget experiment

Starts an A/B test of two saved widget versions, arm A (a version of the widget in the path) and arm B (a version of the same widget or, with `widgetId`, of another widget of the site on the same pages). Neither has to be the live version, and a version tested before can be used again. Each session is assigned to one arm at its first eligible page view, 50/50, and keeps it. The floor of sessions per arm is set by the system and the split is fixed, so the body names the two arms and, when needed, what you confirm. Both versions can no longer change once it starts. The start can take other live widgets on an arm's mount slot offline and replaces the live version of an arm's widget for the test's sessions: call `POST /experiments/preview` first and send what it names in `confirm`. Refused with `widget_experiment_refused` when it cannot start: its `reason` is `same_arm` (the two arms are the same version), `widget_held` (a widget is already in a running test), `no_page_type` (a version shows on no page type), `targeting_mismatch` (the arms target different pages or hold different page rules: same page types on every device, desktop and mobile, and the same rules by products and collections, in any order), `perimeter_overlap` (another test runs on some of the same pages), `holdout_running` (a holdout runs on the site) or `confirmation_required` (the start would take live widgets offline or replace live versions and `confirm` does not cover them: the problem carries a `confirmation` member with what to send back). A widget or version that is not in the site is a `404`. Records an audit entry (`engagement_widget.experiment_started`) attributed to the API key.