---
title: "Update A/B test"
method: PUT
path: "/abtest"
tags: ["A/B testing"]
---

# Update A/B test

`PUT /abtest`

## Request body

- AbTestApiModel — A/B test
  - `Id` integer — A/B test ID
  - `Name` string — A/B test name
  - `StartDate` string, date-time — A/B test start date
  - `EndDate` string, date-time — A/B test end date
  - `Type` 'PersonalMerchandising' | 'FilterTemplate' | 'SortingTemplate' — A/B test type
  - `Status` 'Upcoming' | 'Active' | 'Evaluate' | 'Completed' | 'Archived' — A/B test status (calculated based on dates and archived state)
  - `Variants` AbTestVariantApiModel[] — A/B test variants
    - `Variant` 'A' | 'B' — A/B test variant key.
    - `PersonalMerchandisingId` integer — Personal merchandising ID.
    - `FilterTemplateId` integer — Filter template ID.
    - `SortingTemplateId` integer — Sorting template ID.
    - `NameArchived` string — Name in case the test variant is deleted.

## Response `200`

The id of the updated A/B test

- integer

## Other responses

- `400` — BadRequest

---

[API](https://skmtc.net/tweakwise/apis/frontend-api.md) · [All operations](https://skmtc.net/tweakwise/apis/frontend-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tweakwise/frontend-api/revisions/9bd1e2b3633f/schema)
