---
title: "Resolve incident"
method: POST
path: "/v1/projects/{projectSlug}/incidents/{incidentId}"
tags: ["Incidents"]
---

# Resolve incident

`POST /v1/projects/{projectSlug}/incidents/{incidentId}`

Resolves (closes) an ongoing incident. An already-closed incident is returned unchanged. If the incident's condition triggers again, a new incident will be opened.

## Path parameters

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

## Response `200`

Resolved incident

- Incident
  - `id` string, required — Stable incident identifier.
  - `organizationId` string, required — Organization that owns this incident.
  - `projectId` string, required — Project this incident belongs to.
  - `sourceType` 'monitor' | 'signal', required — Kind of entity that triggered the incident: `signal` or `monitor`.
  - `sourceId` string, required — Id of the entity that triggered the incident (matches `sourceType`).
  - `severity` 'low' | 'medium' | 'high' | 'urgent', required — Severity bucket assigned to the incident: `low`, `medium`, `high`, or `urgent`.
  - `startedAt` string, required — ISO-8601 timestamp at which the incident opened.
  - `endedAt` string, nullable, required — ISO-8601 timestamp at which the incident closed, or `null` if still open.
  - `createdAt` string, required — ISO-8601 timestamp at which the incident row was created.
  - `condition` union, required — The monitor rule configuration when the incident opened, or `null` for signal incidents and match monitors.
    - AlertThresholdCondition
      - `trigger` 'threshold', required — Opens once the measured value crosses the 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` 'cacheHitRate', required — Token-weighted prompt-cache hit rate (cache-read tokens over total input-side tokens), a 0..1 fraction.
        - object
          - `kind` 'avg', required — Average 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.
        - object
          - `kind` 'min', required — Find the minimum numeric field value over matching events.
          - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - object
          - `kind` 'max', required — Find the maximum numeric field value over matching events.
          - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - object
          - `kind` 'median', required — Find the median numeric field value 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.
            - `kind` 'average' | 'period', required — How the comparison rate is computed. `average` is the rolling rate over the last `lookback`; `period` is the equal-length window immediately before it (e.g. `lookback` of 1 day compares against yesterday) for daily/weekly seasonality.
            - `lookback` union, required — Length of the window used to compute the baseline rate.
              - …
        - 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.
    - AlertEscalatingCondition
      - `trigger` 'escalating', required — Opens when the monitor target is escalating or sustained.
      - `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` 'cacheHitRate', required — Token-weighted prompt-cache hit rate (cache-read tokens over total input-side tokens), a 0..1 fraction.
        - object
          - `kind` 'avg', required — Average 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.
        - object
          - `kind` 'min', required — Find the minimum numeric field value over matching events.
          - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - object
          - `kind` 'max', required — Find the maximum numeric field value over matching events.
          - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
        - object
          - `kind` 'median', required — Find the median numeric field value over matching events.
          - `field` 'duration' | 'cost' | 'tokens', required — Numeric field to aggregate.
      - `threshold` union
        - object — How the metric is compared when threshold-based.
          - `mode` 'absolute', required — Compare the metric against a fixed value; read `value`.
          - `value` number, required — Metric value that opens the incident.
        - object — How the metric is compared when threshold-based.
          - `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.
            - `kind` 'average' | 'period', required — How the comparison rate is computed. `average` is the rolling rate over the last `lookback`; `period` is the equal-length window immediately before it (e.g. `lookback` of 1 day compares against yesterday) for daily/weekly seasonality.
            - `lookback` union, required — Length of the window used to compute the baseline rate.
              - …
        - object — How the metric is compared when threshold-based.
          - `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.
      - `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. Minimum 5.

## Other responses

- `400` — Validation error
- `401` — Unauthorized
- `404` — Not found

---

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