curl --request PUT \
--url https://api.getbluejay.ai/v1/update-alert/{alert_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"sample_size": 123,
"name": "<string>",
"description": "<string>",
"is_enabled": true,
"entity_field": "<string>",
"comparison_value": "<string>",
"notification_channels": [
{
"type": "<string>",
"target": "<string>"
}
],
"applies_to_all_agents": true,
"agent_ids": [
123
],
"simulation_id": 123,
"threshold_time_interval": 123,
"min_events": 123
}
'import requests
url = "https://api.getbluejay.ai/v1/update-alert/{alert_id}"
payload = {
"sample_size": 123,
"name": "<string>",
"description": "<string>",
"is_enabled": True,
"entity_field": "<string>",
"comparison_value": "<string>",
"notification_channels": [
{
"type": "<string>",
"target": "<string>"
}
],
"applies_to_all_agents": True,
"agent_ids": [123],
"simulation_id": 123,
"threshold_time_interval": 123,
"min_events": 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({
sample_size: 123,
name: '<string>',
description: '<string>',
is_enabled: true,
entity_field: '<string>',
comparison_value: '<string>',
notification_channels: [{type: '<string>', target: '<string>'}],
applies_to_all_agents: true,
agent_ids: [123],
simulation_id: 123,
threshold_time_interval: 123,
min_events: 123
})
};
fetch('https://api.getbluejay.ai/v1/update-alert/{alert_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/update-alert/{alert_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([
'sample_size' => 123,
'name' => '<string>',
'description' => '<string>',
'is_enabled' => true,
'entity_field' => '<string>',
'comparison_value' => '<string>',
'notification_channels' => [
[
'type' => '<string>',
'target' => '<string>'
]
],
'applies_to_all_agents' => true,
'agent_ids' => [
123
],
'simulation_id' => 123,
'threshold_time_interval' => 123,
'min_events' => 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/update-alert/{alert_id}"
payload := strings.NewReader("{\n \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 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/update-alert/{alert_id}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/update-alert/{alert_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 \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"is_enabled": true,
"organization_id": "<string>",
"entity_type": "standard_metric",
"entity_field": "<string>",
"operator": "equals",
"comparison_value": "<string>",
"notification_channels": [
"<unknown>"
],
"trigger_count": 123,
"applies_to_all_agents": true,
"created_at": "2023-11-07T05:31:56Z",
"threshold_time_interval": 123,
"min_events": 123,
"in_alert": true,
"description": "<string>",
"last_triggered_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"agents": [
123
],
"simulation_id": 123,
"evaluation_scope": "<string>",
"aggregation": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"min_events_type": "events",
"source_scope": "all",
"simulation_name": "<string>",
"sample_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Update Alert
Update an existing alert. Unset fields are preserved; nullable fields can be cleared explicitly.
curl --request PUT \
--url https://api.getbluejay.ai/v1/update-alert/{alert_id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <x-api-key>' \
--data '
{
"sample_size": 123,
"name": "<string>",
"description": "<string>",
"is_enabled": true,
"entity_field": "<string>",
"comparison_value": "<string>",
"notification_channels": [
{
"type": "<string>",
"target": "<string>"
}
],
"applies_to_all_agents": true,
"agent_ids": [
123
],
"simulation_id": 123,
"threshold_time_interval": 123,
"min_events": 123
}
'import requests
url = "https://api.getbluejay.ai/v1/update-alert/{alert_id}"
payload = {
"sample_size": 123,
"name": "<string>",
"description": "<string>",
"is_enabled": True,
"entity_field": "<string>",
"comparison_value": "<string>",
"notification_channels": [
{
"type": "<string>",
"target": "<string>"
}
],
"applies_to_all_agents": True,
"agent_ids": [123],
"simulation_id": 123,
"threshold_time_interval": 123,
"min_events": 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({
sample_size: 123,
name: '<string>',
description: '<string>',
is_enabled: true,
entity_field: '<string>',
comparison_value: '<string>',
notification_channels: [{type: '<string>', target: '<string>'}],
applies_to_all_agents: true,
agent_ids: [123],
simulation_id: 123,
threshold_time_interval: 123,
min_events: 123
})
};
fetch('https://api.getbluejay.ai/v1/update-alert/{alert_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/update-alert/{alert_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([
'sample_size' => 123,
'name' => '<string>',
'description' => '<string>',
'is_enabled' => true,
'entity_field' => '<string>',
'comparison_value' => '<string>',
'notification_channels' => [
[
'type' => '<string>',
'target' => '<string>'
]
],
'applies_to_all_agents' => true,
'agent_ids' => [
123
],
'simulation_id' => 123,
'threshold_time_interval' => 123,
'min_events' => 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/update-alert/{alert_id}"
payload := strings.NewReader("{\n \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 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/update-alert/{alert_id}")
.header("X-API-Key", "<x-api-key>")
.header("Content-Type", "application/json")
.body("{\n \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 123\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v1/update-alert/{alert_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 \"sample_size\": 123,\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"is_enabled\": true,\n \"entity_field\": \"<string>\",\n \"comparison_value\": \"<string>\",\n \"notification_channels\": [\n {\n \"type\": \"<string>\",\n \"target\": \"<string>\"\n }\n ],\n \"applies_to_all_agents\": true,\n \"agent_ids\": [\n 123\n ],\n \"simulation_id\": 123,\n \"threshold_time_interval\": 123,\n \"min_events\": 123\n}"
response = http.request(request)
puts response.read_body{
"id": "<string>",
"name": "<string>",
"is_enabled": true,
"organization_id": "<string>",
"entity_type": "standard_metric",
"entity_field": "<string>",
"operator": "equals",
"comparison_value": "<string>",
"notification_channels": [
"<unknown>"
],
"trigger_count": 123,
"applies_to_all_agents": true,
"created_at": "2023-11-07T05:31:56Z",
"threshold_time_interval": 123,
"min_events": 123,
"in_alert": true,
"description": "<string>",
"last_triggered_at": "2023-11-07T05:31:56Z",
"created_by": "<string>",
"agents": [
123
],
"simulation_id": 123,
"evaluation_scope": "<string>",
"aggregation": "<string>",
"updated_at": "2023-11-07T05:31:56Z",
"updated_by": "<string>",
"min_events_type": "events",
"source_scope": "all",
"simulation_name": "<string>",
"sample_size": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Path Parameters
Body
Request model for updating an alert
Evaluate over the most recent N conversations instead of a time window (minimum 30). NULL keeps the time-window behavior; the alert never fires with fewer than N conversations.
Name of the alert
Description of the alert
Whether the alert is enabled
Type of entity being monitored
standard_metric, custom_goal, custom_metric, metadata_field, system_failure The specific field/metric being monitored
Comparison operator
equals, not_equals, greater_than, less_than, greater_than_or_equal, less_than_or_equal, contains, not_contains Value to compare against
Notification channels configuration
Show child attributes
Show child attributes
Whether the alert applies to all agents
Agent IDs to associate with this alert
Optional experiments.id (simulation) to scope simulation alerts to. Set to null to clear and make the alert agent-scoped.
How this alert is evaluated. Only 'per_simulation_run' is supported.
per_test_result, per_simulation_run, per_simulation_run_window Aggregation mode used to compute the per-run metric value from test results within the run.
none, avg, max, min, count Number of recent completed runs (K). Alert fires if all K runs individually met the condition.
Minimum number of events to trigger the alert
Whether min_events is an absolute count ('events') or a percentage ('percentage')
events, percentage Which data source fires this alert: 'all', 'observability', or 'simulation'
all, observability, simulation Response
Successful Response
Response model for alert operations
Unique identifier for the alert
Name of the alert
Whether the alert is enabled
Organization ID
Type of entity being monitored
standard_metric, custom_goal, custom_metric, metadata_field, system_failure The specific field/metric being monitored
Comparison operator
equals, not_equals, greater_than, less_than, greater_than_or_equal, less_than_or_equal, contains, not_contains Value to compare against
Notification channels configuration
Number of times triggered
Whether the alert applies to all agents
When the alert was created
For observability source_scope: time window in seconds. For simulation source_scope: K = number of recent completed runs.
The minimum number of events for the alert. NULL for simulation alerts.
Whether the alert is in alert
Description of the alert
When the alert was last triggered
User who created the alert
Associated agent IDs
Optional experiments.id (simulation) this alert is scoped to
How this alert is evaluated. Only 'per_simulation_run' is supported.
Aggregation mode used to compute the per-run metric value from test results within the run.
When the alert was last updated
User who last updated the alert
Whether min_events is an absolute count or a percentage
Which data source fires this alert: 'all', 'observability', or 'simulation'
Name of the simulation (experiment) this alert is scoped to, if any
Most recent N conversations the alert is evaluated over; NULL = time window