---
title: Finish Experiment Early
description: Finish Experiment Early
product: general
token_estimate: 1559
---
# Finish Experiment Early

> For AI agents: a documentation index is available at [/llms.txt](/llms.txt). Append `.md` to any page URL for markdown, or send `Accept: text/markdown`.

## Finish Experiment Early

**PUT** `/console/v1/autotunes/{id}/make_decision`

Full URL: `https://statsigapi.net/console/v1/autotunes/{id}/make_decision`

Finish Experiment Early

## Authorizations

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| STATSIG-API-KEY | string | Yes | — | apiKey (header) |

## Path parameters

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id (path) | string | Yes | — | id |

## Body (application/json)

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| id | string | Yes | groupid123 | The ID of the group to launch |
| decisionReason | string | Yes | Your reason for stopping early | The reason for making the decision to update the experiment status |
| removeTargeting | boolean | No | false | Indicates whether to remove targeting from the experiment |
| holdout | integer | No | 10 | Integer percentage of users to hold back when shipping with holdback. Must be an integer between 0 and 50 (inclusive): the launched group size is computed as 100 - holdout * 2, so values above 50 would produce a negative-sized launched group. When set, the experiment remains live with a holdback group so long-term impact can be measured before making a final decision. Requires the ship_experiment_with_holdout gate to be enabled for the project. Constraints: format: int64, min: 0, max: 50 |

## Response (application/json)

**200** — Finish Experiment Early Success

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| message | string | No | — | — |

```json
{
  "message": "Decision made for Autotune Experiment."
}
```

**400** — Invalid request. Please check the request input and try again.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 400 |
| message | string | Yes | — | — |

```json
{
  "status": 400,
  "message": "Autotune experiment has not yet started"
}
```

**401** — This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 401 |
| message | string | Yes | — | — |

```json
{
  "status": 401,
  "message": "This endpoint only accepts an active CONSOLE key, but an invalid key was sent. Key: console-xxxXXXxxxXXXxxx"
}
```

**404** — Not Found. The requested resource could not be found.

| Name | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| status | integer | Yes | — | Allowed values: 404 |
| message | string | Yes | — | — |

```json
{
  "status": 404,
  "message": "Autotune Experiment not found."
}
```

## Code samples

### cURL

```bash
curl -X PUT "https://statsigapi.net/console/v1/autotunes/{id}/make_decision" \
  -H "Content-Type: application/json" \
  -H "STATSIG-API-KEY: YOUR_API_KEY" \
  -d '{
  "id": "experiment123",
  "decisionReason": "Your reason for stopping early",
  "removeTargeting": false
}'
```

### Python

```python
import requests

response = requests.put(
    "https://statsigapi.net/console/v1/autotunes/{id}/make_decision",
    headers={
        "Content-Type": "application/json",
        "STATSIG-API-KEY": "YOUR_API_KEY"
    },
    json={
  "id": "experiment123",
  "decisionReason": "Your reason for stopping early",
  "removeTargeting": false
}
)
data = response.json()
```

### JavaScript

```javascript
const response = await fetch("https://statsigapi.net/console/v1/autotunes/{id}/make_decision", {
  method: "PUT",
  headers: {
    "Content-Type": "application/json",
    "STATSIG-API-KEY": "YOUR_API_KEY"
  },
  body: JSON.stringify({
  "id": "experiment123",
  "decisionReason": "Your reason for stopping early",
  "removeTargeting": false
})
});
const data = await response.json();
```

### PHP

```php
<?php
$ch = curl_init("https://statsigapi.net/console/v1/autotunes/{id}/make_decision");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER, [
    "Content-Type: application/json",
    "STATSIG-API-KEY: YOUR_API_KEY"
]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$body = json_encode({
  "id": "experiment123",
  "decisionReason": "Your reason for stopping early",
  "removeTargeting": false
});
curl_setopt($ch, CURLOPT_POSTFIELDS, $body);
$response = curl_exec($ch);
curl_close($ch);
```

### Go

```go
package main

import (
  "bytes"
  "net/http"
)

func main() {
body := []byte("{\"id\":\"experiment123\",\"decisionReason\":\"Your reason for stopping early\",\"removeTargeting\":false}")
req, _ := http.NewRequest("PUT", "https://statsigapi.net/console/v1/autotunes/{id}/make_decision", bytes.NewReader(body))
req.Header.Set("Content-Type", "application/json")
req.Header.Set("STATSIG-API-KEY", "YOUR_API_KEY")
  client := &http.Client{}
  resp, _ := client.Do(req)
  defer resp.Body.Close()
}
```

### Java

```java
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
      .uri(URI.create("https://statsigapi.net/console/v1/autotunes/{id}/make_decision"))
      .method("PUT", HttpRequest.BodyPublishers.ofString("{\"id\":\"experiment123\",\"decisionReason\":\"Your reason for stopping early\",\"removeTargeting\":false}"))
.header("Content-Type", "application/json")
      .header("STATSIG-API-KEY", "YOUR_API_KEY")
      .build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
```

### Ruby

```ruby
require "net/http"
require "json"

uri = URI("https://statsigapi.net/console/v1/autotunes/{id}/make_decision")
request = Net::HTTP::Put.new(uri)
request["Content-Type"] = "application/json"
request["STATSIG-API-KEY"] = "YOUR_API_KEY"
request.body = "{\"id\":\"experiment123\",\"decisionReason\":\"Your reason for stopping early\",\"removeTargeting\":false}"
response = Net::HTTP.start(uri.hostname, uri.port, use_ssl: uri.scheme == "https") do |http|
  http.request(request)
end
```

