Templates
Update User Template
Update a saved eval agent template. The source pointers cannot be changed.
PATCH
/
v1
/
evals
/
user-templates
/
{id}
Update User Template
curl --request PATCH \
--url https://api.bland.ai/v1/evals/user-templates/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": "<string>",
"category": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": [
{}
],
"target_level_keys": [
{}
],
"visibility": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/evals/user-templates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": [{}],
"target_level_keys": [{}],
"visibility": "<string>"
}
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: '<string>',
category: '<string>',
system_prompt_md: '<string>',
prompt_md: '<string>',
levels: [{}],
target_level_keys: [{}],
visibility: '<string>'
})
};
fetch('https://api.bland.ai/v1/evals/user-templates/{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/user-templates/{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' => '<string>',
'category' => '<string>',
'system_prompt_md' => '<string>',
'prompt_md' => '<string>',
'levels' => [
[
]
],
'target_level_keys' => [
[
]
],
'visibility' => '<string>'
]),
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/user-templates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\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/user-templates/{id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/user-templates/{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\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
"org_id": "b2c3d4e5-6789-abcd-ef01-234567890abc",
"key": "my_hallucination_check",
"name": "My Hallucination Check (Updated)",
"description": "Updated description for our product domain.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and identify any claims that were factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"],
"visibility": "org",
"source_agent_id": null,
"source_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T15:45:00.000Z"
},
"errors": null
}
Headers
Path Parameters
Body Parameters
Ordered scoring levels. Each level object requires
level_key (string, 1-64 chars), label (string, 1-80 chars), and prompt_md (string). The color field is optional: one of rose, amber, gold, emerald, blue, indigo, violet, or fog.Response
Ordered scoring levels.
{
"data": {
"id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
"org_id": "b2c3d4e5-6789-abcd-ef01-234567890abc",
"key": "my_hallucination_check",
"name": "My Hallucination Check (Updated)",
"description": "Updated description for our product domain.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and identify any claims that were factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"],
"visibility": "org",
"source_agent_id": null,
"source_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T15:45:00.000Z"
},
"errors": null
}
Docs for agents: llms.txt
Was this page helpful?
⌘I
Update User Template
curl --request PATCH \
--url https://api.bland.ai/v1/evals/user-templates/{id} \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"name": "<string>",
"description": "<string>",
"category": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": [
{}
],
"target_level_keys": [
{}
],
"visibility": "<string>"
}
'import requests
url = "https://api.bland.ai/v1/evals/user-templates/{id}"
payload = {
"name": "<string>",
"description": "<string>",
"category": "<string>",
"system_prompt_md": "<string>",
"prompt_md": "<string>",
"levels": [{}],
"target_level_keys": [{}],
"visibility": "<string>"
}
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: '<string>',
category: '<string>',
system_prompt_md: '<string>',
prompt_md: '<string>',
levels: [{}],
target_level_keys: [{}],
visibility: '<string>'
})
};
fetch('https://api.bland.ai/v1/evals/user-templates/{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/user-templates/{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' => '<string>',
'category' => '<string>',
'system_prompt_md' => '<string>',
'prompt_md' => '<string>',
'levels' => [
[
]
],
'target_level_keys' => [
[
]
],
'visibility' => '<string>'
]),
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/user-templates/{id}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\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/user-templates/{id}")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/evals/user-templates/{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\": \"<string>\",\n \"category\": \"<string>\",\n \"system_prompt_md\": \"<string>\",\n \"prompt_md\": \"<string>\",\n \"levels\": [\n {}\n ],\n \"target_level_keys\": [\n {}\n ],\n \"visibility\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "a1b2c3d4-5678-9abc-def0-1234567890ab",
"org_id": "b2c3d4e5-6789-abcd-ef01-234567890abc",
"key": "my_hallucination_check",
"name": "My Hallucination Check (Updated)",
"description": "Updated description for our product domain.",
"category": "quality",
"modality": "text",
"system_prompt_md": "You are an expert evaluator assessing whether an AI agent fabricated information.",
"prompt_md": "Review the conversation and identify any claims that were factually incorrect or unsupported.",
"levels": [
{
"level_key": "no_hallucination",
"label": "No Hallucination",
"prompt_md": "The agent made no factually incorrect or unsupported claims.",
"color": "emerald"
},
{
"level_key": "minor_hallucination",
"label": "Minor Hallucination",
"prompt_md": "The agent made one or more small inaccuracies that did not materially mislead the user.",
"color": "amber"
},
{
"level_key": "major_hallucination",
"label": "Major Hallucination",
"prompt_md": "The agent stated clearly false or fabricated information.",
"color": "rose"
}
],
"target_level_keys": ["no_hallucination"],
"visibility": "org",
"source_agent_id": null,
"source_version_id": null,
"created_by": "9a8b7c6d-5e4f-3210-9876-543210fedcba",
"created_at": "2026-05-27T10:00:00.000Z",
"updated_at": "2026-05-27T15:45:00.000Z"
},
"errors": null
}