> 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/segments.md).

# Segments

The Elevate A/B Testing External API /segments endpoint splits results by device, visitor type, and traffic source across four views.

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

Returns the experiment's results split by visitor segment, so you can see where a change worked and where it did not. Four views return the same shape with different metrics.

| View            | Answers                                                         |
| --------------- | --------------------------------------------------------------- |
| `summary`       | How did each segment convert and earn?                          |
| `checkout`      | Where did checkouts stall, and how were discounts used?         |
| `browsing`      | How did visitors move from collections to products to the cart? |
| `subscriptions` | How did subscription orders and revenue differ?                 |

## Parameters

| Parameter                              | Description                                                                                                              |
| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `testId`                               | Path parameter, from [`/experiments`](/elevate-helpcenter/developer-reference/external-api/api-reference/experiments.md) |
| `view`                                 | `summary`, `checkout`, `browsing` or `subscriptions`                                                                     |
| `startDate`, `endDate`, `timeZoneName` | The [date window](/elevate-helpcenter/developer-reference/external-api/dates-and-time-zones.md)                          |
| Filters                                | Any [filter](/elevate-helpcenter/developer-reference/external-api/filters.md), applied before the split                  |

## Response

| Field                     | Type     | What it holds                                                                                                               |
| ------------------------- | -------- | --------------------------------------------------------------------------------------------------------------------------- |
| `view`                    | `string` | The view you asked for                                                                                                      |
| `segments[].dimension`    | `string` | `device`, `user_type`, `traffic_source` or `source_channels`                                                                |
| `segments[].name`         | `string` | The segment, such as `MOBILE`, `new_visitors` or `google`                                                                   |
| `segments[].visitors`     | `object` | `control`, `variations` and `total`, each `number \| null`                                                                  |
| `segments[].variations[]` | `object` | `variationId` (`integer`), `isControl` (`boolean`), `lift` (`number \| null`) and the view's metrics, each `number \| null` |

The `summary` view's metrics are `visitors`, `conversions`, `conversionRate`, `orders`, `revenue`, `revenuePerVisitor`, `averageOrderValue`, `profit` and `profitPerVisitor`. Each other view returns its own set, shown in the example and in the OpenAPI document.

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

```json
{
  "success": true,
  "data": {
    "view": "summary",
    "period": {
      "dateRanges": [
        { "startDate": "2026-09-01 08:00:00", "endDate": "2026-09-18 11:58:35" }
      ]
    },
    "appliedFilters": {},
    "segments": [
      {
        "dimension": "device",
        "name": "MOBILE",
        "visitors": 12310,
        "variations": [
          {
            "variationId": 1001,
            "isControl": true,
            "visitors": 6155,
            "conversions": 191,
            "conversionRate": 3.1,
            "orders": 196,
            "revenue": 12600.4,
            "revenuePerVisitor": 2.05,
            "lift": null
          },
          {
            "variationId": 1002,
            "isControl": false,
            "visitors": 6155,
            "conversions": 210,
            "conversionRate": 3.41,
            "orders": 216,
            "revenue": 13500.2,
            "revenuePerVisitor": 2.19,
            "lift": 9.6
          }
        ]
      }
    ]
  }
}
```

## Worth knowing

{% hint style="info" %}
**`lift` compares different things per view:** conversion rate on `summary`, completion rate on `checkout`, product view rate on `browsing`. The `subscriptions` view has no lift.
{% endhint %}

* **Segments are not filters.** This splits one result set four ways; to narrow the experiment itself, use [filters](/elevate-helpcenter/developer-reference/external-api/filters.md).
* **Small segments move a lot.** Check `visitors` before reading anything into a segment's rates.
* **Unnamed segments are left out**, so the segments will not always add up to the experiment's totals.
