> For the complete documentation index, see [llms.txt](https://docs.elevateab.com/elevate-helpcenter/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elevateab.com/elevate-helpcenter/developer-reference/external-api/api-reference/experiment.md).

# Experiment

The Elevate A/B Testing External API endpoint for one experiment's setup: variations, targeting, audience rules, and change history.

```http
GET /experiments/{testId}
```

Returns how one experiment is set up: its variations, what it targets, who it runs for and how it has changed. It holds no results; for those use [`/summary`](/elevate-helpcenter/developer-reference/external-api/api-reference/summary.md) or [`/results`](/elevate-helpcenter/developer-reference/external-api/api-reference/results.md).

## Response

Everything [`/experiments`](/elevate-helpcenter/developer-reference/external-api/api-reference/experiments.md) returns per item, plus:

| Field                       | Type             | What it holds                                                   |
| --------------------------- | ---------------- | --------------------------------------------------------------- |
| `description`, `hypothesis` | `string \| null` | What the experiment is, and what it expects                     |
| `currency`                  | `string \| null` | The store currency                                              |
| `variations[]`              | `object`         | As in the list, plus `link`, `previewUrl` and `splitUrlTargets` |
| `targeting`                 | `object`         | `productIds`, `collectionIds`, `pages` and `pageTargets`        |
| `audience`                  | `object`         | `filterType` and the `filters` deciding who enters              |
| `history[]`                 | `object`         | `event`, `changedFields` and `createdAt`, newest first          |

```bash
curl https://elevateab.app/api/external/v1/experiments/TEST_ID \
  -H "Authorization: Bearer YOUR_API_KEY"
```

```json
{
  "success": true,
  "data": {
    "testId": "3f2a9c1e-5b7d-4e8a-9f10-2c4d6e8a0b12",
    "name": "Homepage hero",
    "type": "PAGE",
    "status": "Running",
    "goal": "CONVERSION_RATE",
    "testTrafficPercentage": 100,
    "variations": [
      {
        "id": 1001,
        "name": "Control",
        "trafficPercentage": 50,
        "isControl": true
      }
    ],
    "targeting": {
      "productIds": [],
      "collectionIds": [],
      "pages": ["/"],
      "pageTargets": []
    },
    "audience": { "filterType": "all", "filters": [] },
    "history": [
      {
        "event": "Experiment started",
        "changedFields": [],
        "createdAt": "2026-09-01T08:00:00.000Z"
      }
    ]
  }
}
```

## Worth knowing

* **`history` is capped at the 50 most recent entries**, newest first.
* **Targeting depends on the type:** a page experiment lists pages, a price experiment lists products.
* **`404` covers anything the API will not show you:** another store's experiment, a draft, a deleted one, or a type the API does not support.
