Skip to main content
PUT
Update Alert Definition

Authorizations

Authorization
string
header
required

Use Tuner API key (tr_api_...) or user session token. Find your API key in Workspace Settings > API Keys.

Path Parameters

alert_id
integer
required
agent_id
integer
required

Tuner's internal numeric ID for the agent.

workspace_id
integer
required

Workspace ID. Find this in Workspace > General Settings.

Body

application/json

Schema for updating an alert definition.

name
string | null

Alert name

Required string length: 1 - 200
description
string | null

Optional alert description

severity
enum<string> | null

Alert severity level

Available options:
info,
warning,
critical
state
enum<string> | null

Alert state (active or paused)

Available options:
active,
paused
window_ms
integer | null

Rolling time window in milliseconds (e.g. 300000 for 5 minutes). Client must send ms.

Required range: x > 0
cooldown_ms
integer | null

Cooldown period in milliseconds (e.g. 900000 for 15 minutes). Client must send ms.

Required range: x > 0
threshold_n
integer | null

Number of qualifying calls to trigger alert

Required range: x > 0
threshold_type
enum<string> | null

Threshold mode: 'count' or 'percentage'

Available options:
count,
percentage
threshold_percentage
number | null

Required when threshold_type='percentage': percentage threshold (0 < x <= 100)

Required range: 0 < x <= 100
threshold_minimum
integer | null

Required when threshold_type='percentage': minimum qualifying calls (hard gate)

Required range: x > 0
recipients
string<email>[] | null

List of email recipients

Minimum array length: 1
notification_channels
enum<string>[] | null

Channels to notify on: email and/or webhook

Minimum array length: 1

Notification channels available for alert definitions.

Available options:
email,
webhook
condition_tree
ConditionTreeGroup · object | null

Condition tree (root must always be a group node, even for single conditions). For a single condition, use a group with one child predicate.

Response

Successful Response

Response schema for an alert definition.

id
integer
required

Tuner's ID for this alert definition.

Example:

4

agent_id
integer
required

Agent this alert belongs to.

Example:

17

name
string
required

Display name, used in notifications.

Example:

"High red-flag rate"

severity
string
required

Severity label included in notifications.

Example:

"warning"

state
string
required

active when the alert can fire, paused when it can't.

Example:

"active"

window_ms
integer
required

Rolling window in milliseconds. 300000 is five minutes.

Example:

300000

cooldown_ms
integer
required

Minimum time in milliseconds before this alert can fire again.

Example:

900000

recipients
string[]
required

Email addresses notified when the alert fires.

Example:
notification_channels
string[]
required

Where notifications are sent.

Example:
condition_tree
Condition Tree · object
required

Condition a call must match to count toward the threshold.

Example:
created_at
string<date-time>
required

When the alert was created.

Example:

"2026-07-14T09:22:31Z"

updated_at
string<date-time>
required

When the alert was last updated.

Example:

"2026-07-20T11:40:08Z"

description
string | null

Note explaining what this alert watches for.

threshold_type
string
default:count

count fires on an absolute number of matching calls, percentage on a share of the calls evaluated in the window.

Example:

"percentage"

threshold_n
integer | null

Matching calls needed to fire. Set in count mode.

threshold_percentage
number | null

Share of evaluated calls needed to fire. Set in percentage mode.

Example:

20

threshold_minimum
integer | null

Minimum matching calls before the percentage is applied. Set in percentage mode.

Example:

10

last_triggered
string<date-time> | null

When this alert last fired. Null if it never has.

Example:

"2026-07-31T14:05:12Z"

created_by
integer | null

User who created the alert.

updated_by
integer | null

User who last updated it.