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"
}
]
}
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.
Requires an admin, owner, operator, or prompter role. This endpoint takes no body.
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier.
string
required
The experiment’s unique identifier. Must be a valid UUID; returns
400 BAD_REQUEST otherwise.Response
object
The stopped experiment.
Show experiment object
Show experiment object
string
Unique identifier for the experiment.
string
The agent the experiment belonged to.
string
Always
completed on success.string
Always
manual on success.string
The control environment:
production or staging.string | null
The version currently pinned to
baseline_env, which all eligible traffic now runs.string
The version that was under test.
integer
The share of eligible calls the variant was receiving when stopped.
object | null
The weekly schedule that was in effect, or
null.string | null
The configured start, or
null.string | null
The configured end date, or
null.integer | null
The configured cap, or
null.integer
Final count of connected calls routed to the variant.
string | null
ID of the user who created the experiment, or
null when created with an org-level key.string
ISO 8601 timestamp of creation.
string
ISO 8601 timestamp of this stop.
null | array
null on success, or a list of error objects if the request failed.{
"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?