> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Update monitor

> Replaces a monitor's complete configuration.

`axiom.updateMonitor` replaces a monitor's complete configuration. Include every setting to retain, including `notifierIds`, and exactly one APL or MPL query.

```ts automations/axiom-update-monitor.automation.ts theme={null}
import { automation, onHttpRequest } from "automate.ax"
import { axiom } from "automate.ax/axiom"

export default automation("Update monitor", () => {
  onHttpRequest({ scope: "automation" })
  axiom.updateMonitor({
    monitorId: "monitor-id",
    name: "Error volume",
    type: "Threshold",
    aplQuery: "['production'] | where severity == 'error' | count",
    intervalMinutes: 5,
    rangeMinutes: 15,
    operator: "Above",
    threshold: 200,
  })
})
```

## Inputs

`monitorId`, `name`, `type`, positive `intervalMinutes`, and positive `rangeMinutes` are required. Provide exactly one non-empty `aplQuery` or `mplQuery`. The optional fields match `createMonitor`, but this action replaces the full monitor: omitted optional fields are removed or reset by Axiom rather than preserved.

## Output

Returns the complete updated monitor with its ID and available audit metadata.

## Permission and failures

The API token needs the organization-level `monitors|update` capability. Axiom rejects missing monitors, invalid queries, incompatible monitor settings, and unknown notifier IDs. This mutation is not retried automatically after an ambiguous provider response.
