- Channels say where alerts go.
- Rules say which event type goes to which channels.
Channels
URLs and bot tokens are write-only. The API stores them sealed and shows only a hint, such as
hooks.slack.com …x9Qz.
PATCH /v1/alerts/channels/{id} changes the name, recipients or secret; the kind cannot change. Deleting a channel removes it from every rule and drops its queued deliveries.
A workspace has at most 20 channels and 50 rules, and a rule names at most 10 channels.
Test a channel
POST /v1/alerts/channels/{id}/test sends a test alert now and answers 200 with what the provider said:
status is 0 when no response came back. The result is kept as the channel’s last_test. You can test a channel 10 times a minute.
Webhook channels
Awebhook channel gets a signing secret, zwhsec_..., returned once in the create response as signing_secret. To rotate it, create a new channel. Each alert is a POST with these headers:
Zode-Event-IdandZode-Event-TypeZode-Signature:t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">, keyed with the signing secret
Rules
A rule routes one event type to one or more channels.Event types
GET /v1/alerts returns this list with each type’s critical flag and source.
Hosts run the loop breaker in report mode today, so a breaker.tripped alert reads “Loop breaker flagged a possible loop in …” and adds “Nothing was paused: the agent keeps running”. Only a host that enforces the breaker sends “Loop breaker paused the agent in …”.
Each rule sends at most once per event per channel, so a repeated event sends nothing new.
Quiet hours and time zone
A rule can hold alerts during daily quiet hours, for example{"start": "22:00", "end": "07:00"}. The window may cross midnight. A non-critical alert raised inside it is queued and sent when the window ends. Critical alerts are never held, and the API refuses quiet hours on a critical rule.
Quiet hours use the workspace time zone, an IANA name, UTC by default:
Deliveries
GET /v1/alerts/deliveries lists the 50 newest deliveries: rule, channel, event, a one-line summary, status (pending, sent, failed), attempts, held_until when quiet hours held it, the last error and the provider’s response code.
A failed send retries after 30 s, 2 min, 10 min, 30 min and 2 h (6 attempts in all), then becomes failed. A 4xx other than 408, 425 or 429, or any redirect, fails at once. An email channel sends one message per recipient.
Every send is HTTPS only, with a 15 s timeout, no redirects, and no connections to private, loopback or link-local addresses.