Create Alert Definition
Create a new alert definition for an agent.
An alert fires when its condition matches enough calls within a rolling
window. threshold_type decides which threshold fields are required: count
needs threshold_n, percentage needs both threshold_percentage and
threshold_minimum.
condition_tree must have a group at its root and contain at least one
predicate. With percentage, the tree is limited to a single predicate.
Selecting webhook in notification_channels requires the agent to have a
webhook URL configured.
Authorizations
Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.
Path Parameters
Tuner's internal numeric ID for the agent.
Workspace ID. Find this in Workspace > General Settings.
Body
Schema for creating an alert definition.
Alert name
1 - 200Rolling time window in milliseconds (e.g. 300000 for 5 minutes). Client must send ms; frontend converts from seconds/minutes for UX.
List of email recipients
1Channels to notify on: email and/or webhook
1Notification channels available for alert definitions.
email, webhook Condition tree (root must always be a group node, even for single conditions)
Optional alert description
Alert severity level
info, warning, critical Alert state (active or paused)
active, paused Cooldown period in milliseconds (e.g. 900000 for 15 minutes). Client must send ms; frontend converts for UX.
Number of qualifying calls to trigger alert. Required when threshold_type='count'.
x > 0Threshold mode: 'count' (absolute) or 'percentage' (ratio of evaluated calls)
count, percentage Required when threshold_type='percentage': percentage threshold (0 < x <= 100)
0 < x <= 100Required when threshold_type='percentage': minimum qualifying calls before alert fires (hard gate)
x > 0Response
Successful Response
Response schema for an alert definition.
Tuner's ID for this alert definition.
4
Agent this alert belongs to.
17
Display name, used in notifications.
"High red-flag rate"
Severity label included in notifications.
"warning"
active when the alert can fire, paused when it can't.
"active"
Rolling window in milliseconds. 300000 is five minutes.
300000
Minimum time in milliseconds before this alert can fire again.
900000
Email addresses notified when the alert fires.
Where notifications are sent.
Condition a call must match to count toward the threshold.
When the alert was created.
"2026-07-14T09:22:31Z"
When the alert was last updated.
"2026-07-20T11:40:08Z"
Note explaining what this alert watches for.
count fires on an absolute number of matching calls, percentage on a share of the calls evaluated in the window.
"percentage"
Matching calls needed to fire. Set in count mode.
Share of evaluated calls needed to fire. Set in percentage mode.
20
Minimum matching calls before the percentage is applied. Set in percentage mode.
10
When this alert last fired. Null if it never has.
"2026-07-31T14:05:12Z"
User who created the alert.
User who last updated it.