---
title: "Update an A/B experiment"
method: PATCH
path: "/projects/{projectId}/endpoints/{endpointId}/abExperiments/{id}"
tags: ["ABExperimentService"]
---

# Update an A/B experiment

`PATCH /projects/{projectId}/endpoints/{endpointId}/abExperiments/{id}`

Updates an experiment's description or member traffic percentages. Use the experiment etag for optimistic concurrency.

## Path parameters

- `projectId` string, required — Project identifier.
- `endpointId` string, required — Endpoint identifier.
- `id` string, required — A/B experiment identifier.

## Query parameters

- `updateMask` string — Fields to update. If omitted, all mutable fields are overwritten.

## Request body

- DEUpdateABExperimentRequest — Mutable description and traffic allocation for an A/B experiment.
  - `description` string — Updated free-form description.
  - `members` DEABExperimentMember[] — Complete replacement member set. Requires two to 20 deployments, exactly one control, and percentages that add up to 100.
    - `deploymentId` string, required — Deployment under the parent endpoint.
    - `role` 'AB_EXPERIMENT_MEMBER_ROLE_CONTROL' | 'AB_EXPERIMENT_MEMBER_ROLE_VARIANT', required — Role of this deployment within the A/B experiment.
    - `percent` integer, required — Integer traffic percent in [1, 100]. Percentages across all members must sum to 100.
  - `etag` string — Opaque version tag from a prior read for optimistic concurrency.

## Response `200`

OK

- DEABExperiment — Managed cohort split that subdivides a control deployment's live traffic among the control and one or more variants.
  - `id` string, required — Output only. Unique A/B experiment identifier.
  - `projectId` string, required — Output only. Project that owns the parent endpoint.
  - `endpointId` string, required — Output only. Endpoint this A/B experiment belongs to.
  - `name` string, required — Human-readable A/B experiment name, unique within the endpoint.
  - `description` string — Optional free-form description.
  - `members` DEABExperimentMember[], required — Two to 20 participating deployments with exactly one control and percentages that add up to 100.
    - `deploymentId` string, required — Deployment under the parent endpoint.
    - `role` 'AB_EXPERIMENT_MEMBER_ROLE_CONTROL' | 'AB_EXPERIMENT_MEMBER_ROLE_VARIANT', required — Role of this deployment within the A/B experiment.
    - `percent` integer, required — Integer traffic percent in [1, 100]. Percentages across all members must sum to 100.
  - `createdBy` string, required — Output only. Identifier of the principal that created the A/B experiment.
  - `createdAt` string, date-time, required — Output only. Timestamp when the A/B experiment was created.
  - `updatedAt` string, date-time, required — Output only. Timestamp when the A/B experiment was last updated.
  - `etag` string, required — Optional opaque version tag for optimistic concurrency control.

## Other responses

- `default` — Default error response

---

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