For the complete documentation index, see llms.txt. This page is also available as Markdown.

PATCH /v2/evals/monitors/{monitor_id}/alert

Update Eval Monitor Alert

patch

Tune alert settings; explicit null resets a knob to the server default.

How to use

Omit a knob to retain it; set it to null to restore the server default. Read back resolved settings after updating to verify the intended alert behavior.

Authentication and permissions

Required permissions: evals.update. Resource and owner access checks also apply.

Prepare request.json

Save the example body below as request.json for the curl sample. Replace example IDs, node keys, and dynamic configuration with values for your organization; these are illustrative, not pre-existing resources.

{}
Authorizations
AuthorizationstringRequired

Personal API key (sk_...) or supported user access JWT. See Authentication and authorization for endpoint restrictions and scopes. Use exactly one Authorization header.

Path parameters
monitor_idstring · uuidRequired
Body
thresholdnumber · max: 1 · nullableOptional
warning_thresholdnumber · max: 1 · nullableOptional
min_samplesinteger · min: 1 · max: 2147483647 · nullableOptional
window_max_runsinteger · min: 1 · max: 2147483647 · nullableOptional
window_hoursinteger · min: 1 · max: 8760 · nullableOptional
min_effect_sizenumber · max: 1 · nullableOptional
recovery_thresholdnumber · max: 1 · nullableOptional
renotify_hoursinteger · min: 1 · max: 2147483647 · nullableOptional
notifications_enabledboolean · nullableOptional
Responses
200

Successful Response

application/json
response_codestring · nullableOptional

Machine-readable response code, when provided.

patch/v2/evals/monitors/{monitor_id}/alert
curl
curl --fail-with-body -sS -X PATCH \
  "$STACKAI_BASE_URL/v2/evals/monitors/${MONITOR_ID}/alert" \
  -H "Authorization: Bearer $STACKAI_API_KEY" \
  -H 'Content-Type: application/json' \
  --data-binary @request.json
{
  "response_code": "text",
  "meta": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  },
  "data": {
    "threshold": 1,
    "warning_threshold": 1,
    "min_samples": 1,
    "window_max_runs": 1,
    "window_hours": 1,
    "min_effect_size": 1,
    "recovery_threshold": 1,
    "renotify_hours": 1,
    "notifications_enabled": true,
    "severity": "unknown",
    "effective": {
      "threshold": 1,
      "warning_threshold": 1,
      "min_samples": 1,
      "window_max_runs": 1,
      "window_hours": 1,
      "min_effect_size": 1,
      "recovery_threshold": 1,
      "renotify_hours": 1
    },
    "defaults": {
      "threshold": 1,
      "warning_threshold": 1,
      "min_samples": 1,
      "window_max_runs": 1,
      "window_hours": 1,
      "min_effect_size": 1,
      "recovery_threshold": 1,
      "renotify_hours": 1
    }
  }
}

Last updated

Was this helpful?