curl --request PUT \
--url https://api.getbluejay.ai/v1/simulation/{simulation_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_concurrent": 250,
"hangup_on_transfer": true,
"max_call_duration": 123,
"max_turns": 123,
"ringing_timeout": 123,
"digital_humans_settings": {},
"selected_custom_metrics": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_metrics_failing_threshold": 50,
"custom_metrics_passing_threshold": 50,
"outcome_failing_threshold": 49,
"outcome_passing_threshold": 50,
"runs_per_digital_human": 1,
"delay_between_tests_seconds": 150,
"inactivity_timeout_seconds": 1050,
"tags": [
"<string>"
],
"pinned": true,
"custom_error_enabled": true,
"custom_error_prompt": "<string>",
"enable_rerun_failed_test_results": true,
"enable_rerun_on_custom_error": true,
"rerun_max_retries": 123
}
'import requests
url = "https://api.getbluejay.ai/v1/simulation/{simulation_id}"
payload = {
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_concurrent": 250,
"hangup_on_transfer": True,
"max_call_duration": 123,
"max_turns": 123,
"ringing_timeout": 123,
"digital_humans_settings": {},
"selected_custom_metrics": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_metrics_failing_threshold": 50,
"custom_metrics_passing_threshold": 50,
"outcome_failing_threshold": 49,
"outcome_passing_threshold": 50,
"runs_per_digital_human": 1,
"delay_between_tests_seconds": 150,
"inactivity_timeout_seconds": 1050,
"tags": ["<string>"],
"pinned": True,
"custom_error_enabled": True,
"custom_error_prompt": "<string>",
"enable_rerun_failed_test_results": True,
"enable_rerun_on_custom_error": True,
"rerun_max_retries": 123
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bluejay_as_code_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
prompt_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
knowledge_base_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_concurrent: 250,
hangup_on_transfer: true,
max_call_duration: 123,
max_turns: 123,
ringing_timeout: 123,
digital_humans_settings: {},
selected_custom_metrics: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_metrics_failing_threshold: 50,
custom_metrics_passing_threshold: 50,
outcome_failing_threshold: 49,
outcome_passing_threshold: 50,
runs_per_digital_human: 1,
delay_between_tests_seconds: 150,
inactivity_timeout_seconds: 1050,
tags: ['<string>'],
pinned: true,
custom_error_enabled: true,
custom_error_prompt: '<string>',
enable_rerun_failed_test_results: true,
enable_rerun_on_custom_error: true,
rerun_max_retries: 123
})
};
fetch('https://api.getbluejay.ai/v1/simulation/{simulation_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.getbluejay.ai/v1/simulation/{simulation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bluejay_as_code_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'prompt_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'knowledge_base_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_concurrent' => 250,
'hangup_on_transfer' => true,
'max_call_duration' => 123,
'max_turns' => 123,
'ringing_timeout' => 123,
'digital_humans_settings' => [
],
'selected_custom_metrics' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_metrics_failing_threshold' => 50,
'custom_metrics_passing_threshold' => 50,
'outcome_failing_threshold' => 49,
'outcome_passing_threshold' => 50,
'runs_per_digital_human' => 1,
'delay_between_tests_seconds' => 150,
'inactivity_timeout_seconds' => 1050,
'tags' => [
'<string>'
],
'pinned' => true,
'custom_error_enabled' => true,
'custom_error_prompt' => '<string>',
'enable_rerun_failed_test_results' => true,
'enable_rerun_on_custom_error' => true,
'rerun_max_retries' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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.getbluejay.ai/v1/simulation/{simulation_id}"
payload := strings.NewReader("{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.put("https://api.getbluejay.ai/v1/simulation/{simulation_id}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/simulation/{simulation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}"
response = http.request(request)
puts response.read_body{
"agent_id": 123,
"name": "<string>",
"type": "max_concurrent",
"id": 123,
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {},
"max_concurrent": 123,
"max_turns": 123,
"ringing_timeout": 123,
"inactivity_timeout_seconds": 123,
"tags": [
"<string>"
],
"description": "<string>",
"pinned": true,
"always_on": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Simulation
Update a specific simulation by ID. Only fields provided in the request body will be updated.
curl --request PUT \
--url https://api.getbluejay.ai/v1/simulation/{simulation_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_concurrent": 250,
"hangup_on_transfer": true,
"max_call_duration": 123,
"max_turns": 123,
"ringing_timeout": 123,
"digital_humans_settings": {},
"selected_custom_metrics": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"custom_metrics_failing_threshold": 50,
"custom_metrics_passing_threshold": 50,
"outcome_failing_threshold": 49,
"outcome_passing_threshold": 50,
"runs_per_digital_human": 1,
"delay_between_tests_seconds": 150,
"inactivity_timeout_seconds": 1050,
"tags": [
"<string>"
],
"pinned": true,
"custom_error_enabled": true,
"custom_error_prompt": "<string>",
"enable_rerun_failed_test_results": true,
"enable_rerun_on_custom_error": true,
"rerun_max_retries": 123
}
'import requests
url = "https://api.getbluejay.ai/v1/simulation/{simulation_id}"
payload = {
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": "<string>",
"description": "<string>",
"prompt_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_version_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"knowledge_base_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"max_concurrent": 250,
"hangup_on_transfer": True,
"max_call_duration": 123,
"max_turns": 123,
"ringing_timeout": 123,
"digital_humans_settings": {},
"selected_custom_metrics": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"custom_metrics_failing_threshold": 50,
"custom_metrics_passing_threshold": 50,
"outcome_failing_threshold": 49,
"outcome_passing_threshold": 50,
"runs_per_digital_human": 1,
"delay_between_tests_seconds": 150,
"inactivity_timeout_seconds": 1050,
"tags": ["<string>"],
"pinned": True,
"custom_error_enabled": True,
"custom_error_prompt": "<string>",
"enable_rerun_failed_test_results": True,
"enable_rerun_on_custom_error": True,
"rerun_max_retries": 123
}
headers = {
"X-API-Key": "<x-api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<x-api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
bluejay_as_code_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: '<string>',
description: '<string>',
prompt_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
agent_version_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
knowledge_base_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
max_concurrent: 250,
hangup_on_transfer: true,
max_call_duration: 123,
max_turns: 123,
ringing_timeout: 123,
digital_humans_settings: {},
selected_custom_metrics: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
custom_metrics_failing_threshold: 50,
custom_metrics_passing_threshold: 50,
outcome_failing_threshold: 49,
outcome_passing_threshold: 50,
runs_per_digital_human: 1,
delay_between_tests_seconds: 150,
inactivity_timeout_seconds: 1050,
tags: ['<string>'],
pinned: true,
custom_error_enabled: true,
custom_error_prompt: '<string>',
enable_rerun_failed_test_results: true,
enable_rerun_on_custom_error: true,
rerun_max_retries: 123
})
};
fetch('https://api.getbluejay.ai/v1/simulation/{simulation_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.getbluejay.ai/v1/simulation/{simulation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'bluejay_as_code_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => '<string>',
'description' => '<string>',
'prompt_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'agent_version_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'knowledge_base_id' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'max_concurrent' => 250,
'hangup_on_transfer' => true,
'max_call_duration' => 123,
'max_turns' => 123,
'ringing_timeout' => 123,
'digital_humans_settings' => [
],
'selected_custom_metrics' => [
'3c90c3cc-0d44-4b50-8888-8dd25736052a'
],
'custom_metrics_failing_threshold' => 50,
'custom_metrics_passing_threshold' => 50,
'outcome_failing_threshold' => 49,
'outcome_passing_threshold' => 50,
'runs_per_digital_human' => 1,
'delay_between_tests_seconds' => 150,
'inactivity_timeout_seconds' => 1050,
'tags' => [
'<string>'
],
'pinned' => true,
'custom_error_enabled' => true,
'custom_error_prompt' => '<string>',
'enable_rerun_failed_test_results' => true,
'enable_rerun_on_custom_error' => true,
'rerun_max_retries' => 123
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <x-api-key>"
],
]);
$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.getbluejay.ai/v1/simulation/{simulation_id}"
payload := strings.NewReader("{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<x-api-key>")
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.put("https://api.getbluejay.ai/v1/simulation/{simulation_id}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/simulation/{simulation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"bluejay_as_code_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"prompt_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"agent_version_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"knowledge_base_id\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"max_concurrent\": 250,\n \"hangup_on_transfer\": true,\n \"max_call_duration\": 123,\n \"max_turns\": 123,\n \"ringing_timeout\": 123,\n \"digital_humans_settings\": {},\n \"selected_custom_metrics\": [\n \"3c90c3cc-0d44-4b50-8888-8dd25736052a\"\n ],\n \"custom_metrics_failing_threshold\": 50,\n \"custom_metrics_passing_threshold\": 50,\n \"outcome_failing_threshold\": 49,\n \"outcome_passing_threshold\": 50,\n \"runs_per_digital_human\": 1,\n \"delay_between_tests_seconds\": 150,\n \"inactivity_timeout_seconds\": 1050,\n \"tags\": [\n \"<string>\"\n ],\n \"pinned\": true,\n \"custom_error_enabled\": true,\n \"custom_error_prompt\": \"<string>\",\n \"enable_rerun_failed_test_results\": true,\n \"enable_rerun_on_custom_error\": true,\n \"rerun_max_retries\": 123\n}"
response = http.request(request)
puts response.read_body{
"agent_id": 123,
"name": "<string>",
"type": "max_concurrent",
"id": 123,
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"created_by": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"settings": {},
"max_concurrent": 123,
"max_turns": 123,
"ringing_timeout": 123,
"inactivity_timeout_seconds": 123,
"tags": [
"<string>"
],
"description": "<string>",
"pinned": true,
"always_on": true
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}# Bluejay — Testing & Monitoring Platform for Conversational AI Agents
You are a senior backend engineer integrating the Bluejay API. Think step-by-step: first understand the endpoint, then plan the integration, then implement with minimal changes.
## Update Simulation — PUT /v1/simulation/{simulation_id}
> **What this endpoint does:** update a specific simulation by id. only fields provided in the request body will be updated.
**Endpoint:** PUT `https://api.getbluejay.ai/v1/simulation/{simulation_id}`
**Auth:** `X-API-Key` header
**Content-Type:** application/json
### Required Parameters
| Name | Type | Description |
|------|------|-------------|
| simulation_id | integer | |
| X-API-Key | string | API key required to authenticate requests. |
Review the full parameter list at https://docs.getbluejay.ai/api-reference/endpoint/update-simulation and include any optional parameters (e.g., `name`, `description`, `agent_version_id`, `knowledge_base_id`, `max_concurrent`, `hangup_on_transfer`) that serve your integration's use case and align with Bluejay's testing and monitoring capabilities.
### Request Body
```json
{
"name": "string",
"description": "string",
"agent_version_id": "string",
"prompt_id": "string",
"knowledge_base_id": "string",
"max_concurrent": 123,
"hangup_on_transfer": true,
"max_call_duration": 123,
"max_call_duration_units": "minutes",
"max_turns": 123,
"ringing_timeout": 123,
"digital_humans_settings": {
"key": "value"
},
"selected_custom_metrics": [
"string"
],
"custom_metrics_failing_threshold": 123,
"custom_metrics_passing_threshold": 123,
"tags": [
"string"
],
"pinned": true
}
```
### Example
**PUT with body:**
```python
import requests
def update_simulation(simulation_id: int, payload: dict, api_key: str) -> dict:
url = f"https://api.getbluejay.ai/v1/simulation/{simulation_id}"
headers = {"X-API-Key": api_key}
response = requests.put(url, headers=headers, json=payload)
response.raise_for_status()
return response.json()
```
### Constraints
- Minimal changes — only add/change files needed for this integration.
- Match existing codebase patterns (naming, file structure, error handling).
- Include error handling for 422: Validation Error.
### Integration Checklist
Before writing code, verify:
1. Which module/service owns this API domain in the codebase?
2. What HTTP client and error-handling patterns does the project use?
3. Are there existing types/interfaces to extend?
Then implement the integration, export it, and confirm it compiles/passes lint.
agent_version_idDeprecated: prompt_id. Same uuid, still works. If both are sent and they differ, the request is 400.Path Parameters
Body
request body for updating a simulation.
all fields are optional; only provided fields will be updated.
Stable code-addressable identifier
updated simulation name
human‑readable description of the simulation
Deprecated. Use agent_version_id. Same uuid, still works.
optional default agent version UUID for this simulation
optional default knowledge base UUID for this simulation
maximum number of concurrent runs (max 500)
0 < x <= 500whether to hang up the call on transfer
maximum duration of each call. units specified by max_call_duration_units
units for max_call_duration: 'minutes' or 'seconds'
minutes, seconds maximum number of turns per simulation run
ringing timeout in seconds before abandoning
settings for digital humans in the simulation
array of custom metric IDs to be saved in settings
score threshold below which a custom metric is considered failing (0-100)
0 <= x <= 100score threshold at or above which a custom metric is considered passing (0-100)
0 <= x <= 100outcome score threshold below which the simulation is considered failing (0-99)
0 <= x <= 99outcome score threshold at or above which the simulation is considered passing (1-100)
1 <= x <= 100number of simulation runs to execute per digital human
x > 0seconds to wait after a test completes before the next launches (0 = off)
0 <= x <= 300seconds to wait for an agent reply before ending a text conversation (300-1800 = 5-30 min); defaults to 300 when unset
300 <= x <= 1800array of tags for the simulation
whether the simulation is pinned
enable custom-error detection for this simulation
custom-error definition prompt; overrides the org default when set
per-sim override of the org rerun-on-failure flag
per-sim override of the org rerun-on-custom-error flag
max same-run reruns of a failed result (1-5)
Response
Successful Response
max_concurrent, parallel