---
title: "Update a saved draft experiment"
method: PATCH
path: "/api/v1/experiments/{experiment_id}"
tags: ["experiments"]
---

# Update a saved draft experiment

`PATCH /api/v1/experiments/{experiment_id}`

## Request

- Base URL: `https://api.outrival.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.outrival.com/api/v1/experiments/{experiment_id}`
- Auth: HTTP bearer

## Path parameters

- `experiment_id` string, required

## Request body

- UpdateExperimentRequest
  - `name` string, required: What this experiment is testing
  - `primary_metric` 'transfer' | 'success' | 'contact_rate' | 'opted_out' | 'not_interested' | 'post_transfer_follow_up', required
  - `groups` ExperimentGroupRequest[]: The groups to create with the draft. May be empty and filled in later; launch is where the group structure has to be complete
    - `name` string, required: What this group is called
    - `is_control` boolean: Whether this group is the baseline every other group is compared against. Exactly one group is the control, checked at launch
    - `allocation` number, required: Share of the campaign's traffic this group receives, as a PROPORTION IN 0..1 — 0.5 is half of the traffic, not half a percent. Never a percentage. The shares of all groups sum to at most 1; whatever is left is unallocated and stays outside the experiment
    - `pin_overrides` object: {component: version id} — what this group serves instead
  - `allocation` number, nullable: Optional. The experiment's total share of the campaign's traffic, as a PROPORTION IN 0..1. It is NOT stored — allocation lives on the groups — so supplying it only asks this endpoint to confirm that the group shares add up to what you meant, and the request is refused when they do not
  - `targeting_rules` TargetingCondition[]: Conditions a contact must meet to be eligible; empty targets everyone
    - `field` string, required: Contact field to compare
    - `operator` string, required: One of the nine operators the engine matches on
    - `value` string, required: What the field is compared against
  - `note` string, nullable: Free text stored with the experiment
  - `expected_revision` integer, required

## Response `200`

Successful Response

- object

## Other responses

- `422`: Validation Error

## Changes

- **2026-10-15** `196259d463f3`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/outrival/apis/outrival-api/changes/api/v1/experiments/:experiment_id/patch.md)

---

[API](https://skmtc.dev/outrival/apis/outrival-api.md) - [All operations](https://skmtc.dev/outrival/apis/outrival-api/llms.txt) - [OpenAPI document](https://skmtc.dev/outrival/apis/outrival-api/revisions/f27d90300b5e?raw)
