Delete Disposition
curl --request DELETE \
--url https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}"
headers = {"authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}', 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}/dispositions/{disposition_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/dispositions/{disposition_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "ce0deae0-e40c-4a8c-b1e7-6122591f4aea"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Disposition not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Disposition changed while it was being deleted; refresh and try again"
}
]
}
Dispositions
Delete Disposition
Retire a disposition so it stops classifying new calls.
DELETE
/
v2
/
agents
/
{agent_id}
/
dispositions
/
{disposition_id}
Delete Disposition
curl --request DELETE \
--url https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id} \
--header 'authorization: <authorization>'import requests
url = "https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}"
headers = {"authorization": "<authorization>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {authorization: '<authorization>'}};
fetch('https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}', 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}/dispositions/{disposition_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
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}/dispositions/{disposition_id}"
req, _ := http.NewRequest("DELETE", 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.delete("https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}")
.header("authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v2/agents/{agent_id}/dispositions/{disposition_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "ce0deae0-e40c-4a8c-b1e7-6122591f4aea"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Disposition not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Disposition changed while it was being deleted; refresh and try again"
}
]
}
Dispositions are enabled per organization. If your organization does not have them, every route under
/dispositions returns 404.Overview
Retires a disposition. It is disabled and marked deleted, so it stops running on new calls and no longer appears in List Dispositions. Results already recorded on past calls are left alone. The call is idempotent: deleting a disposition that is already deleted succeeds and returns the same body, so a retry after a dropped connection is safe. Requires an admin, owner, operator, or prompter role.Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The agent’s unique identifier. Must be a UUID.
string
required
The disposition’s unique identifier. Must be a UUID, and must belong to this agent. Returns
404 NOT_FOUND otherwise.Response
string
The disposition that was deleted. Matches
{disposition_id}.null | array
null on success, or a list of error objects if the request failed. Returns 409 CONFLICT when the disposition changed while the delete was in flight; read it again and retry.{
"data": {
"id": "ce0deae0-e40c-4a8c-b1e7-6122591f4aea"
},
"errors": null
}
{
"data": null,
"errors": [
{
"error": "NOT_FOUND",
"message": "Disposition not found"
}
]
}
{
"data": null,
"errors": [
{
"error": "CONFLICT",
"message": "Disposition changed while it was being deleted; refresh and try again"
}
]
}
Docs for agents: llms.txt
Was this page helpful?