---
title: "Create monitor"
method: POST
path: "/v1/projects/{projectSlug}/monitors"
tags: ["Monitors"]
---

# Create monitor

`POST /v1/projects/{projectSlug}/monitors`

Creates a monitor with its saved-search alert. The slug is derived from `name`. The watched saved search must not contain a semantic component (unquoted free text) — monitors need an exact match rule, so only quoted literal and backtick phrase terms are allowed.

## Path parameters

- `projectSlug` string, required — Project slug (human-readable identifier)

## Request body

- CreateMonitorBody
  - `name` string, required — Human-readable name. Used to derive the slug.
  - `description` string — Optional free-form description.
  - `alerts` CreateMonitorAlertBody[], required — The monitor's alert. Exactly one.
    - `kind` 'savedSearch.match' | 'savedSearch.threshold' | 'savedSearch.escalating', required — What the alert fires on. `savedSearch.threshold` and `savedSearch.escalating` need a matching `condition`.
    - `source` object, required — The saved search this alert watches.
      - `type` 'issue' | 'savedSearch', required — Must be `savedSearch`.
      - `id` string, required — Id of the saved search this alert watches.
    - `condition` union — Kind-specific configuration. Required for `savedSearch.threshold` and `savedSearch.escalating`; omit for `savedSearch.match`.
      - object
        - `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` '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` '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.
    - `severity` 'low' | 'medium' | 'high' — Severity of incidents this alert opens. Defaults per kind when omitted.

## Response `201`

Monitor created

- 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.
    - `severity` 'low' | 'medium' | 'high', required — Severity of incidents this alert opens: `low`, `medium`, or `high`.
    - `createdAt` string, required — ISO-8601 timestamp of creation.
  - `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
- `404` — Not found

## Changes

- **2026-06-15** `0e5d35c9aa15` — 1 breaking, 3 warning
  - the response property `alerts/items/source` became nullable for the status `201`
  - added the new `event.matched` enum value to the `alerts/items/kind` response property for the response status `201`
  - added the new `metric.escalating` enum value to the `alerts/items/kind` response property for the response status `201`
  - added the new `metric.threshold` enum value to the `alerts/items/kind` response property for the response status `201`
- **2026-06-05** `7a4027f058a7` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/latitude-dev/apis/latitude/changes/v1/projects/:projectSlug/monitors/post.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.dev/latitude-dev/apis/latitude/revisions/bcfa3b9b2add?raw)
