Skip to main content
PATCH
Update an alert

Authorizations

X-API-Key
string
header
required

API key for authentication

Headers

X-Coval-Workspace-Id
string

Workspace that scopes this operation. When omitted, the organization's active default workspace is used when one can be resolved.

Required string length: 1 - 26

Path Parameters

alert_id
string
required

Alert ULID

Pattern: ^[0-9A-Z]{26}$

Body

application/json
enabled
boolean | null

Pause or resume the whole alert rule. Set false to pause, true to resume; omission or null leaves the current value unchanged.

name
string
Maximum string length: 200
description
string
Maximum string length: 2000
evaluation_type
enum<string>

When the alert evaluates

Available options:
ON_RUN_COMPLETE
conversation_source
enum<string>

Which conversations the alert applies to

Available options:
ALL,
UPLOADED,
SIMULATED
match_mode
enum<string>

How multiple conditions are combined (AND vs OR)

Available options:
ALL,
ANY
cooldown_seconds
integer
Required range: 0 <= x <= 86400
custom_message_template
string | null
agent_ids
string[] | null
required_tags
string[] | null
scheduled_run_ids
string[] | null
customer_metadata
object | null

Exact scalar Run customer metadata filters, joined by AND. Literal keys are 1–256 characters; values are case-sensitive text. A list of values matches when the metadata equals any one of them. Numbers and booleans use JSON text; missing, null, array, and object values do not match. Omission or null leaves filters unchanged. An empty object clears filters only if at least one metric condition remains.

conditions
object[]

Replaces all existing conditions. With ALL match mode, an empty list matches every conversation passing the remaining filters. ANY requires a metric condition or customer_metadata filter. Null or omission preserves conditions.

channels
object[]

Replaces all channels; at most one HUMAN_REVIEW channel is allowed. Null or omission preserves channels.

Response

Alert updated

ulid
string
required

Alert ULID

Pattern: ^[0-9A-Z]{26}$
Example:

"01HZ0EXAMPLE00000000000000"

name
string
required

Human-readable alert name

Maximum string length: 200
Example:

"Latency SLA Alert"

status
enum<string>
required

Alert status

Available options:
ACTIVE,
DELETED
enabled
boolean
default:true
required

Whether the alert evaluates and dispatches. Legacy alerts without this value are treated as enabled.

evaluation_type
enum<string>
required

When the alert evaluates

Available options:
ON_RUN_COMPLETE
conversation_source
enum<string>
required

Which conversations the alert applies to

Available options:
ALL,
UPLOADED,
SIMULATED
match_mode
enum<string>
required

How multiple conditions are combined (AND vs OR)

Available options:
ALL,
ANY
cooldown_seconds
integer
required

Minimum seconds between triggers

Required range: 0 <= x <= 86400
create_time
string<date-time>
required

Creation timestamp

update_time
string<date-time>
required

Last update timestamp

attribution
object

Authoring timestamps and user IDs. Unknown or deleted users are null.

description
string
default:""

Optional description

custom_message_template
string | null

Custom notification message template

Maximum string length: 5000
agent_ids
string[] | null

Restrict to specific agent IDs

required_tags
string[] | null

Restrict to runs with these tags

scheduled_run_ids
string[] | null

Restrict to runs originating from these scheduled runs

customer_metadata
object

Exact scalar Run customer metadata filters, joined by AND. Literal keys are 1–256 characters; values are case-sensitive text. A list of values matches when the metadata equals any one of them. Numbers and booleans use JSON text; missing, null, array, and object values do not match. An empty object applies no metadata filter.

trigger_count
integer

Number of times this alert has triggered

last_triggered_at
string<date-time> | null

Last trigger timestamp

conditions
object[]

Evaluation conditions

channels
object[]

Notification channels