---
title: "End A/B Test"
method: PUT
path: "/comparison/{id}?type=finish"
---

# End A/B Test

`PUT /comparison/{id}?type=finish`

Declare a winner and end an A/B test. Sets the winner_video_id, fills ended_at, and changes the test status to COMPLETED. This action is irreversible.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `type` string, required

## Request body

- object
  - `winner_video_id` string, uuid, required — ID of the video declared as the winner of the test

## Response `200`

A/B test ended successfully

- object

## Other responses

- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `422` — Unprocessable Entity
- `500` — Internal Server Error

---

[API](https://skmtc.net/pandavideo/apis/api-v2.md) · [All operations](https://skmtc.net/pandavideo/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/pandavideo/api-v2/revisions/4fbd3c623ca9/schema)
