---
title: "End an active A/B test"
method: POST
path: "/cms/pages/2026-09/site-pages/ab-test/end"
tags: ["A/B tests"]
---

# End an active A/B test

`POST /cms/pages/2026-09/site-pages/ab-test/end`

## Request

- Base URL: `https://api.hubapi.com`
- URL: `https://api.hubapi.com/cms/pages/2026-09/site-pages/ab-test/end`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.hubspot.com/oauth/authorize`
    - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `marketplace_validation`
  - OAuth 2
    - Authorization code: `https://app.hubspot.com/oauth/authorize`
    - Token URL: `https://api.hubapi.com/oauth/v1/token` scopes: `content`

End an active A/B test and designate a winner.

## Request body `*/*`

- AbTestEndRequestVNext
  - `abTestId` string, required: ID of the test to end.
  - `winnerId` string, required: ID of the object to designate as the test winner.

## Response `204`

No content

## Other responses

- `default`: An error occurred.

## Changes

- **2026-11-02** (2026-09) `2d6b40da6e33`: 2 info
  - the security scope `marketplace_validation` was added to the endpoint's security scheme `oauth2`
  - the security scope `content` was removed from the endpoint's security scheme `oauth2`

[Operation history](https://skmtc.dev/hubspot/apis/cms-pages/changes/cms/pages/2026-09/site-pages/ab-test/end/post.md)

---

[API](https://skmtc.dev/hubspot/apis/cms-pages.md) - [All operations](https://skmtc.dev/hubspot/apis/cms-pages/llms.txt) - [OpenAPI document](https://skmtc.dev/hubspot/apis/cms-pages/revisions/2d6b40da6e33?raw)
