---
title: "Get A/B test stats"
method: GET
path: "/ab-tests/{abTestId}/stats"
tags: ["A/B Tests"]
---

# Get A/B test stats

`GET /ab-tests/{abTestId}/stats`

Returns aggregate and per-variant engagement stats for an A/B test.

## Path parameters

- `abTestId` string, required

## Query parameters

- `period` '1h' | '24h' | '7d' | '30d' | '90d'
- `start` string, date-time
- `end` string, date-time
- `includeMachineEngagement` boolean

## Response `200`

A/B test stats returned

- object
  - `success` boolean
  - `abTestId` string
  - `period` string
  - `start` string, date-time
  - `end` string, date-time
  - `stats` object
  - `variants` object[]
    - `id` string
    - `label` string
    - `subject` string
    - `isWinner` boolean
    - `stats` object

## Other responses

- `400` — Invalid period or date range
- `401` — Unauthorized
- `404` — A/B test not found
- `503` — The database was temporarily unavailable. The request may be retried after the delay in Retry-After.

## Changes

- **2026-08-19** `ba3a29c6eb33` — 4 info
  - added the optional property `retryable` to the response with the `400` status
  - added the optional property `retryable` to the response with the `401` status
  - added the optional property `retryable` to the response with the `404` status
  - added the optional property `retryable` to the response with the `503` status
- **2026-08-18** `8fbabe82a04d` — 1 info
  - added the non-success response with the status `503`
- **2026-08-16** `6fd2903b91ce` — 3 info
  - added the optional property `code` to the response with the `400` status
  - added the optional property `code` to the response with the `401` status
  - added the optional property `code` to the response with the `404` status
- **2026-08-02** `36f92fc0caa2` — 3 breaking
  - the response property `success` became optional for the status `400`
  - the response property `success` became optional for the status `401`
  - the response property `success` became optional for the status `404`
- **2026-06-19** `fd494fa7e64d` — 1 info
  - added the new optional `query` request parameter `includeMachineEngagement`

[Full history](https://skmtc.dev/sequenzy/apis/sequenzy-api/changes/ab-tests/:abTestId/stats/get.md)

---

[API](https://skmtc.dev/sequenzy/apis/sequenzy-api.md) · [All operations](https://skmtc.dev/sequenzy/apis/sequenzy-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/sequenzy/sequenzy-api/revisions/73f826277d9a/schema)
