Cancel Check Run
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel"
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}/check-runs/{run_id}/cancel', 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}/check-runs/{run_id}/cancel",
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}/check-runs/{run_id}/cancel"
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}/check-runs/{run_id}/cancel")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel")
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": {
"id": "9eab4005-81c7-46c4-b4af-cd219844dd53",
"agent_id": "358f36b8-91ea-4c19-90ed-f1ebc9f861c9",
"env_type": "staging",
"agent_version_id": "a26b7ffd-7f60-4f62-9592-861d40fdac3c",
"semver": null,
"version_name": "Trim hold music prompt",
"status": "CANCELLED",
"judge_names": ["Resolution quality"],
"scenario_count": 3,
"simulations_count": 5,
"overall_passed": null,
"verdicts": null,
"simulation_set_id": "9d76db16-4da7-450f-9c78-f72539731e1e",
"eval_run_id": null,
"error_message": null,
"triggered_by": "1473e1e7-c185-4c56-85fb-dab8863394b3",
"created_at": "2026-09-10T19:22:07.530Z",
"started_at": "2026-09-10T19:22:10.088Z",
"completed_at": "2026-09-10T19:25:41.962Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Check run is not in a cancellable state"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Check run not found"
}
]
}
Checks
Cancel Check Run
Cancel a pending or running check run.
POST
/
v2
/
agents
/
{agent_id}
/
check-runs
/
{run_id}
/
cancel
Cancel Check Run
curl --request POST \
--url https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel"
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}/check-runs/{run_id}/cancel', 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}/check-runs/{run_id}/cancel",
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}/check-runs/{run_id}/cancel"
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}/check-runs/{run_id}/cancel")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/check-runs/{run_id}/cancel")
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": {
"id": "9eab4005-81c7-46c4-b4af-cd219844dd53",
"agent_id": "358f36b8-91ea-4c19-90ed-f1ebc9f861c9",
"env_type": "staging",
"agent_version_id": "a26b7ffd-7f60-4f62-9592-861d40fdac3c",
"semver": null,
"version_name": "Trim hold music prompt",
"status": "CANCELLED",
"judge_names": ["Resolution quality"],
"scenario_count": 3,
"simulations_count": 5,
"overall_passed": null,
"verdicts": null,
"simulation_set_id": "9d76db16-4da7-450f-9c78-f72539731e1e",
"eval_run_id": null,
"error_message": null,
"triggered_by": "1473e1e7-c185-4c56-85fb-dab8863394b3",
"created_at": "2026-09-10T19:22:07.530Z",
"started_at": "2026-09-10T19:22:10.088Z",
"completed_at": "2026-09-10T19:25:41.962Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Check run is not in a cancellable state"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Check run not found"
}
]
}
Overview
Marks aPENDING or RUNNING run CANCELLED and stops its scoring work. A cancelled run never produces a final verdict, and cancelling frees the environment so a new run can be started with Start Check Run. Returns 409 CONFLICT when the run is already PASSED, FAILED, ERROR, or CANCELLED. Cancelling never changes an environment pointer.
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 check run’s unique identifier.
Response
object
The cancelled run, with
status set to CANCELLED and completed_at set to the cancellation time.Show check run object
Show check run object
string
Unique identifier for the check run.
string
The agent the run belongs to.
string
The environment whose checks were run:
staging or production.string
The candidate version the run was scoring.
string | null
The candidate’s published version number, or
null if it has never been published.string | null
The candidate’s saved name, or
null if it has none.string
Always
CANCELLED on success.array
Display names of the judges frozen into the run when it started.
integer
Number of scenarios the run was driving conversations from.
integer
Conversations generated per scenario.
boolean | null
null for a cancelled run.array | null
null for a cancelled run. See Get Check Run for the verdict object.string | null
ID of the generated conversation set, if generation had started.
string | null
ID of the scoring run, if scoring had started.
string | null
null unless the run had already hit an error.string | null
ID of the user who started the run, or
null when started with an org-level key.string
ISO 8601 timestamp the run was created.
string | null
When scoring began, or
null if the run was cancelled while PENDING.string | null
The cancellation time.
null | array
null on success, or a list of error objects if the request failed.{
"data": {
"id": "9eab4005-81c7-46c4-b4af-cd219844dd53",
"agent_id": "358f36b8-91ea-4c19-90ed-f1ebc9f861c9",
"env_type": "staging",
"agent_version_id": "a26b7ffd-7f60-4f62-9592-861d40fdac3c",
"semver": null,
"version_name": "Trim hold music prompt",
"status": "CANCELLED",
"judge_names": ["Resolution quality"],
"scenario_count": 3,
"simulations_count": 5,
"overall_passed": null,
"verdicts": null,
"simulation_set_id": "9d76db16-4da7-450f-9c78-f72539731e1e",
"eval_run_id": null,
"error_message": null,
"triggered_by": "1473e1e7-c185-4c56-85fb-dab8863394b3",
"created_at": "2026-09-10T19:22:07.530Z",
"started_at": "2026-09-10T19:22:10.088Z",
"completed_at": "2026-09-10T19:25:41.962Z"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Check run is not in a cancellable state"
}
]
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Check run not found"
}
]
}
Docs for agents: llms.txt
Was this page helpful?