Agent Testing
Clone Test Template
Clone a template to create a new scenario bound to your pathway or persona.
POST
/
v1
/
agent-testing
/
templates
/
{id}
/
clone
Clone Test Template
curl --request POST \
--url https://api.bland.ai/v1/agent-testing/templates/{id}/clone \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"pathway_id": "<string>",
"persona_id": "<string>",
"name": "<string>",
"description": "<string>",
"tester_persona_prompt": "<string>",
"max_turns": 123,
"request_data": {},
"start_node_id": "<string>",
"bland_tone_enabled": true,
"is_required_for_promotion": true
}
'import requests
url = "https://api.bland.ai/v1/agent-testing/templates/{id}/clone"
payload = {
"pathway_id": "<string>",
"persona_id": "<string>",
"name": "<string>",
"description": "<string>",
"tester_persona_prompt": "<string>",
"max_turns": 123,
"request_data": {},
"start_node_id": "<string>",
"bland_tone_enabled": True,
"is_required_for_promotion": True
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pathway_id: '<string>',
persona_id: '<string>',
name: '<string>',
description: '<string>',
tester_persona_prompt: '<string>',
max_turns: 123,
request_data: {},
start_node_id: '<string>',
bland_tone_enabled: true,
is_required_for_promotion: true
})
};
fetch('https://api.bland.ai/v1/agent-testing/templates/{id}/clone', 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/agent-testing/templates/{id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pathway_id' => '<string>',
'persona_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tester_persona_prompt' => '<string>',
'max_turns' => 123,
'request_data' => [
],
'start_node_id' => '<string>',
'bland_tone_enabled' => true,
'is_required_for_promotion' => true
]),
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/agent-testing/templates/{id}/clone"
payload := strings.NewReader("{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.bland.ai/v1/agent-testing/templates/{id}/clone")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent-testing/templates/{id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}"
response = http.request(request)
puts response.read_body{
"scenario": {
"id": "scn_8f2a1b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "Voicemail Detection",
"description": "Simulates a voicemail greeting to verify the agent correctly detects and handles voicemail.",
"category": "VOICEMAIL",
"tester_persona_prompt": "You are a voicemail system. Greet the caller with a standard voicemail message: 'Hi, you've reached John. I'm not available right now. Please leave a message after the beep.' Then remain silent.",
"tester_persona_name": "Voicemail System",
"pathway_id": "pw_abc123",
"persona_id": null,
"max_turns": 4,
"request_data": {},
"start_node_id": null,
"bland_tone_enabled": true,
"is_required_for_promotion": false,
"assertions": [
{
"type": "call_ended_by_agent",
"config": {},
"description": "Agent should hang up after detecting voicemail"
},
{
"type": "latency_below",
"config": {
"max_ms": 3000
},
"description": "Agent response latency stays below 3 seconds"
}
],
"created_at": "2026-04-14T18:30:00.000Z"
}
}
Headers
Path Parameters
Body
Whether to require this scenario to pass before a pathway can be promoted. Default
false.Response
The newly created scenario object cloned from the template.
id(string): The unique identifier for the new scenario.name(string): The scenario name.description(string): The scenario description.category(string): The category inherited from the template.tester_persona_prompt(string): The prompt driving the simulated caller.tester_persona_name(string): The name of the simulated caller persona.pathway_id(string): The pathway this scenario is bound to (if applicable).persona_id(string): The persona this scenario is bound to (if applicable).max_turns(integer): The maximum number of conversational turns.request_data(object): The request data for the test call.start_node_id(string): The starting node ID (if set).bland_tone_enabled(boolean): Whether Bland Tone is enabled.is_required_for_promotion(boolean): Whether this scenario is required for pathway promotion.assertions(array): The assertion objects inherited from the template.type(string): The assertion type.config(object): Configuration specific to the assertion type.description(string): A human-readable description of the assertion.
created_at(string): ISO 8601 timestamp of when the scenario was created.
{
"scenario": {
"id": "scn_8f2a1b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "Voicemail Detection",
"description": "Simulates a voicemail greeting to verify the agent correctly detects and handles voicemail.",
"category": "VOICEMAIL",
"tester_persona_prompt": "You are a voicemail system. Greet the caller with a standard voicemail message: 'Hi, you've reached John. I'm not available right now. Please leave a message after the beep.' Then remain silent.",
"tester_persona_name": "Voicemail System",
"pathway_id": "pw_abc123",
"persona_id": null,
"max_turns": 4,
"request_data": {},
"start_node_id": null,
"bland_tone_enabled": true,
"is_required_for_promotion": false,
"assertions": [
{
"type": "call_ended_by_agent",
"config": {},
"description": "Agent should hang up after detecting voicemail"
},
{
"type": "latency_below",
"config": {
"max_ms": 3000
},
"description": "Agent response latency stays below 3 seconds"
}
],
"created_at": "2026-04-14T18:30:00.000Z"
}
}
Docs for agents: llms.txt
Was this page helpful?
⌘I
Clone Test Template
curl --request POST \
--url https://api.bland.ai/v1/agent-testing/templates/{id}/clone \
--header 'Content-Type: application/json' \
--header 'authorization: <authorization>' \
--data '
{
"pathway_id": "<string>",
"persona_id": "<string>",
"name": "<string>",
"description": "<string>",
"tester_persona_prompt": "<string>",
"max_turns": 123,
"request_data": {},
"start_node_id": "<string>",
"bland_tone_enabled": true,
"is_required_for_promotion": true
}
'import requests
url = "https://api.bland.ai/v1/agent-testing/templates/{id}/clone"
payload = {
"pathway_id": "<string>",
"persona_id": "<string>",
"name": "<string>",
"description": "<string>",
"tester_persona_prompt": "<string>",
"max_turns": 123,
"request_data": {},
"start_node_id": "<string>",
"bland_tone_enabled": True,
"is_required_for_promotion": True
}
headers = {
"authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
pathway_id: '<string>',
persona_id: '<string>',
name: '<string>',
description: '<string>',
tester_persona_prompt: '<string>',
max_turns: 123,
request_data: {},
start_node_id: '<string>',
bland_tone_enabled: true,
is_required_for_promotion: true
})
};
fetch('https://api.bland.ai/v1/agent-testing/templates/{id}/clone', 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/agent-testing/templates/{id}/clone",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'pathway_id' => '<string>',
'persona_id' => '<string>',
'name' => '<string>',
'description' => '<string>',
'tester_persona_prompt' => '<string>',
'max_turns' => 123,
'request_data' => [
],
'start_node_id' => '<string>',
'bland_tone_enabled' => true,
'is_required_for_promotion' => true
]),
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/agent-testing/templates/{id}/clone"
payload := strings.NewReader("{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}")
req, _ := http.NewRequest("POST", 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.post("https://api.bland.ai/v1/agent-testing/templates/{id}/clone")
.header("authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bland.ai/v1/agent-testing/templates/{id}/clone")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"pathway_id\": \"<string>\",\n \"persona_id\": \"<string>\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"tester_persona_prompt\": \"<string>\",\n \"max_turns\": 123,\n \"request_data\": {},\n \"start_node_id\": \"<string>\",\n \"bland_tone_enabled\": true,\n \"is_required_for_promotion\": true\n}"
response = http.request(request)
puts response.read_body{
"scenario": {
"id": "scn_8f2a1b3c-4d5e-6f7a-8b9c-0d1e2f3a4b5c",
"name": "Voicemail Detection",
"description": "Simulates a voicemail greeting to verify the agent correctly detects and handles voicemail.",
"category": "VOICEMAIL",
"tester_persona_prompt": "You are a voicemail system. Greet the caller with a standard voicemail message: 'Hi, you've reached John. I'm not available right now. Please leave a message after the beep.' Then remain silent.",
"tester_persona_name": "Voicemail System",
"pathway_id": "pw_abc123",
"persona_id": null,
"max_turns": 4,
"request_data": {},
"start_node_id": null,
"bland_tone_enabled": true,
"is_required_for_promotion": false,
"assertions": [
{
"type": "call_ended_by_agent",
"config": {},
"description": "Agent should hang up after detecting voicemail"
},
{
"type": "latency_below",
"config": {
"max_ms": 3000
},
"description": "Agent response latency stays below 3 seconds"
}
],
"created_at": "2026-04-14T18:30:00.000Z"
}
}