Update Eval Agent Version
curl --request PATCH \
--url https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": {},
"modality": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": {},
"target_level_keys": {},
"weight": 123
}
'import requests
url = "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}"
payload = {
"name": "<string>",
"description": {},
"modality": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": {},
"target_level_keys": {},
"weight": 123
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: {},
modality: '<string>',
system_prompt_md: '<string>',
prompt_md: '<string>',
levels: {},
target_level_keys: {},
weight: 123
})
};
fetch('https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_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/v1/evals/agents/{eval_agent_id}/versions/{version_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => [
],
'modality' => '<string>',
'system_prompt_md' => '<string>',
'prompt_md' => '<string>',
'levels' => [
],
'target_level_keys' => [
],
'weight' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}"
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"description": "Refined grading criteria with clearer level descriptions.",
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer specializing in empathy.",
"prompt_md": "Did the agent acknowledge and validate the caller's feelings? Review the full transcript and select the most appropriate verdict.",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent proactively acknowledged the caller's feelings with warmth and specificity.",
"color": "emerald"
},
{
"level_key": "adequate",
"label": "Adequate",
"prompt_md": "The agent showed some empathy but responses were generic or brief.",
"color": "amber"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored, dismissed, or failed to acknowledge the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 15,
"created_from_version_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"updated_at": "2026-05-27T12:00:00.000Z"
}
}
Versions
Update Eval Agent Version
Edit a draft version’s prompt, levels, targets, or weight.
PATCH
/
v1
/
evals
/
agents
/
{eval_agent_id}
/
versions
/
{version_id}
Update Eval Agent Version
curl --request PATCH \
--url https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": {},
"modality": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": {},
"target_level_keys": {},
"weight": 123
}
'import requests
url = "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}"
payload = {
"name": "<string>",
"description": {},
"modality": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": {},
"target_level_keys": {},
"weight": 123
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: {},
modality: '<string>',
system_prompt_md: '<string>',
prompt_md: '<string>',
levels: {},
target_level_keys: {},
weight: 123
})
};
fetch('https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_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/v1/evals/agents/{eval_agent_id}/versions/{version_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => [
],
'modality' => '<string>',
'system_prompt_md' => '<string>',
'prompt_md' => '<string>',
'levels' => [
],
'target_level_keys' => [
],
'weight' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("authorization", "<authorization>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/agents/{eval_agent_id}/versions/{version_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": {},\n \"modality\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": {},\n \"target_level_keys\": {},\n \"weight\": 123\n}"
response = http.request(request)
puts response.read_body{
"errors": null,
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"description": "Refined grading criteria with clearer level descriptions.",
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer specializing in empathy.",
"prompt_md": "Did the agent acknowledge and validate the caller's feelings? Review the full transcript and select the most appropriate verdict.",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent proactively acknowledged the caller's feelings with warmth and specificity.",
"color": "emerald"
},
{
"level_key": "adequate",
"label": "Adequate",
"prompt_md": "The agent showed some empathy but responses were generic or brief.",
"color": "amber"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored, dismissed, or failed to acknowledge the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 15,
"created_from_version_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"updated_at": "2026-05-27T12:00:00.000Z"
}
}
Headers
string
required
Your API key for authentication.
Path Parameters
string
required
The unique identifier of the eval agent.
string
required
The unique identifier of the version to update. Must be in the
editable state.Body Parameters
string
Updated display name for this version. Between 1 and 200 characters.
string | null
Updated description, or
null to clear it.string
The modality for this version. One of
text or audio.string
Updated system prompt for the judge LLM, in Markdown. Maximum 8000 characters.
string
Updated grading prompt for the judge LLM, in Markdown. Maximum 8000 characters.
array of objects
Verdict levels for graded mode. Pass an empty array for pass/fail mode. Maximum 5 levels. Each level object requires:
level_key(string, 1-64 characters): unique key within this version.label(string, 1-80 characters): display label shown in results.prompt_md(string): description used in the grading prompt.color(string, optional): one ofrose,amber,gold,emerald,blue,indigo,violet,fog.
array of strings
Which level keys count as a target match. Must be empty for pass/fail agents. Every key listed must match a defined level.
number
Relative weight of this agent in aggregate scoring. Between 0 and 100.
Response
string
Unique identifier for this version.
string
ID of the organization that owns this version.
string
ID of the parent eval agent.
integer
Sequential version number.
string
Name of this version.
string | null
Description of this version, or
null.string
State of this version. One of
editable or archived.string
One of
text or audio.string
The system prompt for the judge LLM, in Markdown.
string
The grading prompt for the judge LLM, in Markdown.
array of objects
Updated verdict levels. Each level contains
level_key, label, prompt_md, and optionally color.array of strings
Updated target level keys.
number
Updated weight. Between 0 and 100.
string | null
ID of the version this was forked from, or
null.string | null
Identifier of the user who created this version, or
null.string
ISO 8601 timestamp for when this version was created.
string
ISO 8601 timestamp for when this version was last updated.
{
"errors": null,
"data": {
"id": "b2c3d4e5-f6a7-8901-bcde-f12345678901",
"org_id": "f0e1d2c3-b4a5-9678-fedc-ba9876543210",
"eval_agent_id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"version_number": 3,
"name": "Empathy Check v3",
"description": "Refined grading criteria with clearer level descriptions.",
"state": "editable",
"modality": "audio",
"system_prompt_md": "You are an expert call quality reviewer specializing in empathy.",
"prompt_md": "Did the agent acknowledge and validate the caller's feelings? Review the full transcript and select the most appropriate verdict.",
"levels": [
{
"level_key": "excellent",
"label": "Excellent",
"prompt_md": "The agent proactively acknowledged the caller's feelings with warmth and specificity.",
"color": "emerald"
},
{
"level_key": "adequate",
"label": "Adequate",
"prompt_md": "The agent showed some empathy but responses were generic or brief.",
"color": "amber"
},
{
"level_key": "poor",
"label": "Poor",
"prompt_md": "The agent ignored, dismissed, or failed to acknowledge the caller's feelings.",
"color": "rose"
}
],
"target_level_keys": ["excellent"],
"weight": 15,
"created_from_version_id": "c3d4e5f6-a7b8-9012-cdef-123456789012",
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-15T08:00:00.000Z",
"updated_at": "2026-05-27T12:00:00.000Z"
}
}
Was this page helpful?