Skip to main content
Detections evaluate your data on a schedule and call a webhook when a condition is met. A rule is either a threshold over a query or a code detection that runs custom logic. Creating and editing detections requires an admin role.

Threshold detection

A threshold rule runs a query and compares a count or aggregate against a threshold.

Code detection

A code detection runs custom logic against the data. Test it before saving — POST /v1/admin/detections/test dry-runs the code and returns its output and logs without creating a rule.
Once it behaves as expected, create the rule with "kind": "code" and the code field set.

Review runs

Each execution is recorded. List a rule’s runs to see when it triggered and whether the webhook was delivered:
See the Detections reference for every field.