Skip to main content
PUT
Update Alert

Headers

X-Organization-Id
string
X-API-Key
string
required

API key required to authenticate requests.

Path Parameters

alert_id
string<uuid>
required

Body

application/json

Request model for updating an alert

sample_size
integer | null

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
string | null

Name of the alert

description
string | null

Description of the alert

is_enabled
boolean | null

Whether the alert is enabled

entity_type
enum<string> | null

Type of entity being monitored

Available options:
standard_metric,
custom_goal,
custom_metric,
metadata_field,
system_failure
entity_field
string | null

The specific field/metric being monitored

operator
enum<string> | null

Comparison operator

Available options:
equals,
not_equals,
greater_than,
less_than,
greater_than_or_equal,
less_than_or_equal,
contains,
not_contains
comparison_value
string | null

Value to compare against

notification_channels
NotificationChannelRequest · object[] | null

Notification channels configuration

applies_to_all_agents
boolean | null

Whether the alert applies to all agents

agent_ids
integer[] | null

Agent IDs to associate with this alert

simulation_id
integer | null

Optional experiments.id (simulation) to scope simulation alerts to. Set to null to clear and make the alert agent-scoped.

evaluation_scope
enum<string> | null

How this alert is evaluated. Only 'per_simulation_run' is supported.

Available options:
per_test_result,
per_simulation_run,
per_simulation_run_window
aggregation
enum<string> | null

Aggregation mode used to compute the per-run metric value from test results within the run.

Available options:
none,
avg,
max,
min,
count
threshold_time_interval
integer | null

Number of recent completed runs (K). Alert fires if all K runs individually met the condition.

min_events
integer | null

Minimum number of events to trigger the alert

min_events_type
enum<string> | null

Whether min_events is an absolute count ('events') or a percentage ('percentage')

Available options:
events,
percentage
source_scope
enum<string> | null

Which data source fires this alert: 'all', 'observability', or 'simulation'

Available options:
all,
observability,
simulation

Response

Successful Response

Response model for alert operations

id
string
required

Unique identifier for the alert

name
string
required

Name of the alert

is_enabled
boolean
required

Whether the alert is enabled

organization_id
string
required

Organization ID

entity_type
enum<string>
required

Type of entity being monitored

Available options:
standard_metric,
custom_goal,
custom_metric,
metadata_field,
system_failure
entity_field
string
required

The specific field/metric being monitored

operator
enum<string>
required

Comparison operator

Available options:
equals,
not_equals,
greater_than,
less_than,
greater_than_or_equal,
less_than_or_equal,
contains,
not_contains
comparison_value
string
required

Value to compare against

notification_channels
any[]
required

Notification channels configuration

trigger_count
integer
required

Number of times triggered

applies_to_all_agents
boolean
required

Whether the alert applies to all agents

created_at
string<date-time>
required

When the alert was created

threshold_time_interval
integer | null
required

For observability source_scope: time window in seconds. For simulation source_scope: K = number of recent completed runs.

min_events
integer | null
required

The minimum number of events for the alert. NULL for simulation alerts.

in_alert
boolean
required

Whether the alert is in alert

description
string | null

Description of the alert

last_triggered_at
string<date-time> | null

When the alert was last triggered

created_by
string | null

User who created the alert

agents
integer[] | null

Associated agent IDs

simulation_id
integer | null

Optional experiments.id (simulation) this alert is scoped to

evaluation_scope
string | null

How this alert is evaluated. Only 'per_simulation_run' is supported.

aggregation
string | null

Aggregation mode used to compute the per-run metric value from test results within the run.

updated_at
string<date-time> | null

When the alert was last updated

updated_by
string | null

User who last updated the alert

min_events_type
string
default:events

Whether min_events is an absolute count or a percentage

source_scope
string
default:all

Which data source fires this alert: 'all', 'observability', or 'simulation'

simulation_name
string | null

Name of the simulation (experiment) this alert is scoped to, if any

sample_size
integer | null

Most recent N conversations the alert is evaluated over; NULL = time window