Create an alert on a metric widget

POST/api/v1/dashboards/{dashboard_id}/widgets/{widget_id}/alert

Create a threshold alert rule bound to a metric widget. The rule is evaluated against the widget's stored snapshot — it never re-executes the widget's source tool, so the alert is exactly as fresh as the dashboard itself. Returns 400 if the widget is not a metric widget or if value_path does not resolve to a number in the current snapshot.

Operation ID: create_widget_alert_api_v1_dashboards__dashboard_id__widgets__widget_id__alert_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Parameters

Path

dashboard_idstringrequired
widget_idstringrequired

Request body

namestring
threshold_valueintegerrequired
threshold_directionstringrequired

One of: above, below

value_pathstring
channelsarray · string
check_frequencystring

One of: hourly, daily, weekly

cooldown_hoursinteger
descriptionstring
slack_channelstring

Responses

201Successful Response

successboolean
messagestring
codestring
dataWidgetAlertResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

404Not Found - Resource does not exist

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject