Skip to main content
A webhook connection receives the same events as Slack, as signed JSON. Use it to feed a deploy pipeline, an incident tool, or your own bot.

Set up

In Settings, Connections, add a webhook connection with: Every webhook connection receives the events of every agent, demo agents included. Select Test to send a signed test request. A 2xx response marks the connection ok; any other response or a network error marks it error.

Events

Body

The body is JSON with sorted keys, no extra whitespace, and non-ASCII characters escaped. verdict holds: For release_detected the summary is the pending state of the release with the baseline Apgar chose. The test request has event set to test, idempotency_key set to test: followed by sent_at, agent, release, previous_verdict, and verdict set to null, demo set to false, and text set to Apgar connection test.

Failed metrics

Each entry of failed_metrics names its metric by id. direction is the direction that counts as worse: up, down, or both. delta, ci, and tolerance are fractions: with tolerance_mode abs they are absolute differences, so 0.02 is 2 pp; with rel they are relative to the baseline value, so 0.10 is 10 %. See Metrics for what each one measures.

Headers

Verify a request

A receiver should:
  1. Reject a request whose timestamp differs from its own clock by more than 5 minutes.
  2. Compute the HMAC-SHA256 of X-Apgar-Timestamp, a period, and the raw body bytes with the connection secret, and compare it with X-Apgar-Signature in constant time. Parsing and serializing the JSON again changes the bytes and breaks the signature.
  3. Store idempotency_key and ignore a delivery whose key it has already accepted. A retry after a timeout can arrive although the first attempt was handled.

Idempotency keys

Every webhook connection receives the same key for the same notification.

Retries

A network error, a 429, or a 5xx response is retried after 1, 5, 15, and 60 minutes. After the fifth failed attempt the notification is marked failed. Any other status fails at once. Settings, Notifications lists failed deliveries and can queue them again.