Experiments
Stop Experiment
End an active experiment and return traffic to baseline.
POST
/
v2
/
agents
/
{agent_id}
/
experiments
/
{experiment_id}
/
stop
Stop Experiment
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"experiment": {
"id": "339da41c-429f-4a5b-81c5-5f33fe01a266",
"agent_id": "b8c322a1-9498-4a20-abd0-78ab3957b7d8",
"status": "completed",
"completed_reason": "manual",
"baseline_env": "staging",
"baseline_current_version_id": "4f8eb28b-8d56-44bb-9297-afe154f5acea",
"variant_version_id": "2adb110d-e30d-49db-9e68-1d0904e462e3",
"traffic_percentage": 40,
"run_hours": null,
"starts_at": null,
"ends_at": null,
"variant_call_quota": null,
"variant_calls_routed": 96,
"created_by": "c52e0087-b404-46af-aa5f-073edb5a3913",
"created_at": "2026-09-09T09:05:44.310Z",
"completed_at": "2026-09-10T21:37:12.654Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "The experiment is already completed"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}
Overview
Completes an active experiment withcompleted_reason: "manual". Eligible calls immediately return to the baseline pin, and the final variant_calls_routed count is frozen on the record. Completion is permanent: a stopped experiment cannot be resumed, so use Create Experiment to test again. Returns 409 CONFLICT if the experiment is already completed for any reason.
Experiments are available on enterprise plans. Other organizations get 403 ENTERPRISE_REQUIRED. This endpoint also requires an admin, owner, operator, or prompter role, and takes no body.
Headers
Path Parameters
The experiment’s unique identifier. Must be a valid UUID; returns
400 BAD_REQUEST otherwise.Response
The stopped experiment.
Show experiment object
Show experiment object
ID of the user who created the experiment, or
null when no user is recorded. For a request made with an API key, this is the user who created the key.{
"data": {
"experiment": {
"id": "339da41c-429f-4a5b-81c5-5f33fe01a266",
"agent_id": "b8c322a1-9498-4a20-abd0-78ab3957b7d8",
"status": "completed",
"completed_reason": "manual",
"baseline_env": "staging",
"baseline_current_version_id": "4f8eb28b-8d56-44bb-9297-afe154f5acea",
"variant_version_id": "2adb110d-e30d-49db-9e68-1d0904e462e3",
"traffic_percentage": 40,
"run_hours": null,
"starts_at": null,
"ends_at": null,
"variant_call_quota": null,
"variant_calls_routed": 96,
"created_by": "c52e0087-b404-46af-aa5f-073edb5a3913",
"created_at": "2026-09-09T09:05:44.310Z",
"completed_at": "2026-09-10T21:37:12.654Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "The experiment is already completed"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?
⌘I
Stop Experiment
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop"
headers = {"authorization": "<authorization>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"authorization: <authorization>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/experiments/{experiment_id}/stop")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"experiment": {
"id": "339da41c-429f-4a5b-81c5-5f33fe01a266",
"agent_id": "b8c322a1-9498-4a20-abd0-78ab3957b7d8",
"status": "completed",
"completed_reason": "manual",
"baseline_env": "staging",
"baseline_current_version_id": "4f8eb28b-8d56-44bb-9297-afe154f5acea",
"variant_version_id": "2adb110d-e30d-49db-9e68-1d0904e462e3",
"traffic_percentage": 40,
"run_hours": null,
"starts_at": null,
"ends_at": null,
"variant_call_quota": null,
"variant_calls_routed": 96,
"created_by": "c52e0087-b404-46af-aa5f-073edb5a3913",
"created_at": "2026-09-09T09:05:44.310Z",
"completed_at": "2026-09-10T21:37:12.654Z"
}
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "The experiment is already completed"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Experiment not found"
}
]
}