Set alert template
set_alert_templateSet or clear one alert template per monitor event type or cause without affecting others. Validates variables; empty resets to default.
Instructions
Requires the write scope or higher. Sets or clears one alert message template on a monitor; every other template is kept (read-modify-write). The template is validated for allowed variables before saving, and an empty template resets that entry to the built-in default. Event types: 'down', 'recovery', 'fail', 'every-run', 'success', 'started', 'blocked', 'note'. The template argument lists the variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Monitor UUID. | |
| cause | No | Optional cause for a per-cause override (e.g. 'silence', 'overrun', 'never_started', 'stalled', 'runaway', 'upstream'). Omitted or empty: an event-type-wide template. | |
| template | Yes | Template text with {variable} placeholders; an empty string resets to the built-in default. Variables: {check_name}, {event}, {status}, {cause}, {last_ping}, {schedule}, {incident_url}, {run_url}, {branch}, {commit}, {actor}, {failing_stage}, {duration}, {latency}, {status_code}, {url}, {last_step}, {step_count}, {run_duration}, {body}, {detail}, {title}. {failing_stage}: CI only; GitLab, GitHub when the webhook subscribes to workflow_job, not Jenkins. {body} is the triggering ping's text, which carries a 'blocked' or 'note' reason. {title} is the run's title (its /start body or /title), filled for 'fail', 'stalled' and 'overrun' when the run is identified; else empty. | |
| event_type | Yes | Event type: 'down', 'recovery', 'fail', 'every-run', 'success', 'started', 'blocked', 'note'. |