---
title: "Update monitor"
method: PATCH
path: "/v1/projects/{projectSlug}/monitors/{monitorSlug}"
tags: ["Monitors"]
---

# Update monitor

`PATCH /v1/projects/{projectSlug}/monitors/{monitorSlug}`

Updates a monitor's name and description. System monitors cannot be edited.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)
- `monitorSlug` string, required — Monitor slug (human-readable identifier within the project).

## Request body

- UpdateMonitorBody
  - `name` string — New name. Renaming may regenerate the slug — re-read the response or rely on `id`.
  - `description` string — New description.

## Response `200`

Updated monitor

- Monitor
  - `id` string, required — Stable monitor identifier.
  - `organizationId` string, required — Organization that owns this monitor.
  - `projectId` string, required — Project this monitor belongs to.
  - `slug` string, required — URL-safe slug derived from `name`. Unique within the project.
  - `name` string, required — Human-readable name.
  - `description` string, required — Free-form description. Empty string when not set.
  - `system` boolean, required — `true` for the auto-provisioned system monitors, which can't be deleted or edited; `false` otherwise.
  - `alerts` MonitorAlert[], required — The monitor's alerts. Always at least one.
    - `id` string, required — Stable alert identifier.
    - `monitorId` string, required — Monitor that owns this alert.
    - `kind` 'issue.new' | 'issue.regressed' | 'issue.escalating' | 'savedSearch.match' | 'savedSearch.threshold' | 'savedSearch.escalating' | 'event.matched' | 'metric.threshold' | 'metric.escalating', required — What the alert fires on. The `savedSearch.*` kinds watch a saved search; `issue.*` are system-only.
    - `source` MonitorAlertSource, nullable, required — The entity this alert watches, or `null` for unified alerts whose target lives on the monitor.
      - `type` 'issue' | 'savedSearch', required — Entity the alert watches: `savedSearch` or `issue`.
      - `id` string, nullable, required — Id of the watched entity, or `null` to watch all entities of its `type`.
    - `condition` union, required
      - object — Kind-specific configuration, or `null` for kinds with no parameters.
        - `kind` 'savedSearch.threshold', required — Threshold alert: opens once the count threshold is crossed.
        - `threshold` union, required — How the match count/rate is compared.
          - object
            - `mode` 'absolute', required — Compare the match count against a fixed number; read `count`.
            - `count` integer, required — Number of matching traces that opens the incident.
          - object
            - `mode` 'multiplier', required — Compare the match rate against `factor × baseline`; read `factor` and `baseline`.
            - `factor` number, required — Multiple of the baseline rate that opens the incident (e.g. `3` = 3×).
            - `baseline` AlertBaseline, required — Fixed-window baseline the current rate is compared against.
              - …
          - object
            - `mode` 'expected', required — Compare against the seasonally-learned expected rate for this time of day/week (the same detector as automatic issue escalation); the only knob is `sensitivity`.
            - `sensitivity` integer — Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted.
      - object — Kind-specific configuration, or `null` for kinds with no parameters.
        - `kind` 'savedSearch.escalating', required — Sustained alert: opens only when the threshold stays crossed for the whole `window`.
        - `threshold` union, required — How the match count/rate is compared.
          - object
            - `mode` 'absolute', required — Compare the match count against a fixed number; read `count`.
            - `count` integer, required — Number of matching traces that opens the incident.
          - object
            - `mode` 'multiplier', required — Compare the match rate against `factor × baseline`; read `factor` and `baseline`.
            - `factor` number, required — Multiple of the baseline rate that opens the incident (e.g. `3` = 3×).
            - `baseline` AlertBaseline, required — Fixed-window baseline the current rate is compared against.
              - …
          - object
            - `mode` 'expected', required — Compare against the seasonally-learned expected rate for this time of day/week (the same detector as automatic issue escalation); the only knob is `sensitivity`.
            - `sensitivity` integer — Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted.
        - `window` object, required — Sustained-condition window.
          - `minutes` integer, required — How long the threshold must stay crossed before the incident opens. The incident stays open while the threshold keeps holding over this window and closes once it no longer does. Minimum 5.
      - object — Kind-specific configuration, or `null` for kinds with no parameters.
        - `kind` 'issue.escalating', required — System signal-escalation alert; only `sensitivity` is tunable.
        - `sensitivity` integer — Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted.
      - object — Kind-specific configuration, or `null` for kinds with no parameters.
        - `kind` 'metric.threshold', required — Metric alert: opens once the target metric crosses a threshold.
        - `metric` union, required — Metric measured over the monitor target.
          - object
            - `kind` 'count', required — Count matching events in each evaluation bucket.
          - object
            - `kind` 'errorRate', required — Measure the fraction of matching events that errored.
          - object
            - `kind` 'avg', required — Average a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
          - object
            - `kind` 'p95', required — Compute the 95th percentile of a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
          - object
            - `kind` 'sum', required — Sum a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - `threshold` union, required — How the metric is compared.
          - object
            - `mode` 'absolute', required — Compare the metric against a fixed value; read `value`.
            - `value` number, required — Metric value that opens the incident.
          - object
            - `mode` 'multiplier', required — Compare the metric rate against `factor × baseline`; read `factor` and `baseline`.
            - `factor` number, required — Multiple of the baseline rate that opens the incident (e.g. `3` = 3×).
            - `baseline` AlertBaseline, required — Fixed-window baseline the current rate is compared against.
              - …
          - object
            - `mode` 'expected', required — Compare against the seasonally-learned expected value for this time of day/week.
            - `sensitivity` integer — Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted.
        - `direction` 'above' | 'below' — Direction that opens the incident. Defaults to `above` when omitted.
      - object — Kind-specific configuration, or `null` for kinds with no parameters.
        - `kind` 'metric.escalating', required — Sustained metric alert: opens when the target metric stays across threshold for the whole `window`.
        - `metric` union, required — Metric measured over the monitor target.
          - object
            - `kind` 'count', required — Count matching events in each evaluation bucket.
          - object
            - `kind` 'errorRate', required — Measure the fraction of matching events that errored.
          - object
            - `kind` 'avg', required — Average a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
          - object
            - `kind` 'p95', required — Compute the 95th percentile of a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
          - object
            - `kind` 'sum', required — Sum a numeric field over matching events.
            - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - `threshold` union, required — How the metric is compared.
          - object
            - `mode` 'absolute', required — Compare the metric against a fixed value; read `value`.
            - `value` number, required — Metric value that opens the incident.
          - object
            - `mode` 'multiplier', required — Compare the metric rate against `factor × baseline`; read `factor` and `baseline`.
            - `factor` number, required — Multiple of the baseline rate that opens the incident (e.g. `3` = 3×).
            - `baseline` AlertBaseline, required — Fixed-window baseline the current rate is compared against.
              - …
          - object
            - `mode` 'expected', required — Compare against the seasonally-learned expected value for this time of day/week.
            - `sensitivity` integer — Detector sensitivity from 1 (noisiest) to 6 (strictest). Defaults to 3 when omitted.
        - `direction` 'above' | 'below' — Direction that opens the incident. Defaults to `above` when omitted.
        - `window` object, required — Sustained-condition window.
          - `minutes` integer, required — How long the threshold must stay crossed before the incident opens. Minimum 5.
    - `severity` 'low' | 'medium' | 'high', required — Severity of incidents this alert opens: `low`, `medium`, or `high`.
    - `createdAt` string, required — ISO-8601 timestamp of creation.
  - `target` MonitorTarget, nullable, required — Unified query-time target for tool, user, and raw-stream monitors; `null` for legacy saved-search and system monitors.
    - `stream` 'traces' | 'spans' | 'sessions', required — Telemetry stream to evaluate: `traces` for users, `spans` for tools, or `sessions` for session-level monitors.
    - `filterSet` MonitorFilterSet, nullable, required — Filters that select the target rows. Use `{}` for all users; use `operation = execute_tool` for all tools.
    - `query` string, nullable, required — Optional semantic query applied with the filters. Use `null` for user/tool monitors.
    - `savedSearchId` string, nullable, required — Saved-search target id, or `null` when `filterSet` and `query` define the target inline.
    - `metric` union, required
      - object — Default metric measured by this monitor target.
        - `kind` 'count', required — Count matching events in each evaluation bucket.
      - object — Default metric measured by this monitor target.
        - `kind` 'errorRate', required — Measure the fraction of matching events that errored.
      - object — Default metric measured by this monitor target.
        - `kind` 'avg', required — Average a numeric field over matching events.
        - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
      - object — Default metric measured by this monitor target.
        - `kind` 'p95', required — Compute the 95th percentile of a numeric field over matching events.
        - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
      - object — Default metric measured by this monitor target.
        - `kind` 'sum', required — Sum a numeric field over matching events.
        - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
  - `mutedAt` string, nullable, required — ISO-8601 timestamp at which the monitor was muted, or `null` when active.
  - `deletedAt` string, nullable, required — ISO-8601 timestamp at which the monitor was deleted, or `null`.
  - `createdAt` string, required — ISO-8601 timestamp of creation.
  - `updatedAt` string, required — ISO-8601 timestamp of the last update.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `403` — System monitors cannot be edited
- `404` — Not found

## Changes

- **2026-06-19** `b68fa53b6ab1` — 1 breaking, 2 info
  - added `subschema #1, subschema #2, subschema #4, subschema #5` to the `alerts/items/condition/allOf[#/components/schemas/AlertCondition]/` response property `oneOf` list for the response status `200`
  - removed `subschema #1, subschema #2` from the `alerts/items/condition/allOf[#/components/schemas/AlertCondition]/` response property `oneOf` list for the response status `200`
  - added the required property `target` to the response with the `200` status
- **2026-06-15** `0e5d35c9aa15` — 1 breaking, 3 warning
  - the response property `alerts/items/source` became nullable for the status `200`
  - added the new `event.matched` enum value to the `alerts/items/kind` response property for the response status `200`
  - added the new `metric.escalating` enum value to the `alerts/items/kind` response property for the response status `200`
  - added the new `metric.threshold` enum value to the `alerts/items/kind` response property for the response status `200`
- **2026-06-05** `7a4027f058a7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/latitude-dev/apis/latitude/changes/v1/projects/:projectSlug/monitors/:monitorSlug/patch.md)

---

[API](https://skmtc.dev/latitude-dev/apis/latitude.md) · [All operations](https://skmtc.dev/latitude-dev/apis/latitude/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latitude-dev/latitude/revisions/b68fa53b6ab1/schema)
