---
title: "Create an anomaly rule"
description: ""
canonical: "https://pgbeam.com/docs/api/anomalies/createAnomalyRule"
last-updated: "2026-09-25T00:34:28.000Z"
---

# Create an anomaly rule

> 

URL: https://pgbeam.com/docs/api/anomalies/createAnomalyRule

Retunes one detection metric for this project, or for one agent credential
in it. Without a rule every metric resolves to the deployment default.

A rule adds no detection algorithm and no alert kind: it changes how
sensitive one of the five existing metrics is. enabled=false silences that
metric for that scope; the baseline keeps advancing, so re-enabling
resumes from the existing history rather than a cold warm-up.
