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
}
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
string
required
Your API key for authentication.
Path Parameters
string
required
The UUID of the user template to update.
Body Parameters
string
Display name for the template. Maximum 120 characters.
string
Description of the template. Maximum 4000 characters. Pass
null to clear.string
Category label for the template. Maximum 64 characters. Pass
null to clear.string
System prompt for the eval agent, in Markdown. Maximum 50000 characters.
string
Evaluation prompt, in Markdown. Maximum 50000 characters.
array
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.array
Array of
level_key strings that represent the passing threshold.string
Access scope for the template. One of
private, org, or public.Response
string
Unique identifier (UUID) for the template.
string
UUID of the organization that owns this template.
string
Short key used to reference the template.
string
Display name of the template.
string
Description of the template, or
null.string
Category of the template, or
null.string
Evaluation modality. Either
text or audio.string
System prompt for the eval agent, in Markdown.
string
Evaluation prompt, in Markdown.
array
Ordered scoring levels.
array
Array of
level_key strings that represent the passing threshold.string
Access scope. One of
private, org, or public.string
UUID of the eval agent this template was snapshotted from, or
null.string
UUID of the specific version snapshotted, or
null.string
UUID of the user who created the template, or
null.string
ISO 8601 timestamp of when the template was created.
string
ISO 8601 timestamp of when the template was last updated.
{
"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