---
title: "Update alert state"
method: PATCH
path: "/v1/alerts/{id}/state"
tags: ["Alert"]
---

# Update alert state

`PATCH /v1/alerts/{id}/state`

## Request

- Base URL: `https://api.cloud.precisely.com`
- URL: `https://api.cloud.precisely.com/v1/alerts/{id}/state`
- Auth: HTTP bearer

Updates the lifecycle state of an alert, optionally recording a comment. A dismiss reason is required when closing an alert.

## Path parameters

- `id` string, required

## Request body

- AlertPatchStateRequest: Request payload for updating an alert's lifecycle state
  - `comment` AlertPatchCommentRequest: Comment recorded when patching an alert's state
    - `reason` 'FALSE_POSITIVE' | 'EXPECTED_BEHAVIOR' | 'FIXED' | 'WONT_FIX' | 'OTHER'
    - `text` string
  - `state` 'NEW' | 'OPEN' | 'IN_PROGRESS' | 'CLOSED'

## Response `200`

Alert state updated

- AlertResponse: Alert emitted by an observer for an evaluated metric value
  - `alert` AlertDetail: Detailed alert evaluation data returned with an observer alert
    - `alertTimestamp` string, date-time
    - `bandSnapshot` BandSnapshot: Snapshot of the expected observer band bounds at alert evaluation time
      - `expectedValue` number, double
      - `lowerBound` number, double
      - `upperBound` number, double
    - `evaluations` AlertItemView[]
      - `confidenceMetrics` unknown[]
        - unknown
      - `configType` string
      - `currentValue` number, double
      - `direction` string
      - `drifts` unknown[]
        - unknown
      - `evaluationType` string
      - `level` string
      - `metricKey` string
      - `metrics` unknown[]
        - unknown
      - `thresholdBreached` number, double
      - `thresholdMetrics` unknown[]
        - unknown
    - `metricTimestamp` string, date-time
    - `observerId` string
    - `tenantId` string
  - `assetId` string
  - `createdBy` string
  - `createdDate` string, date-time
  - `evaluationType` 'NUMERIC' | 'TEMPORAL' | 'STRUCTURAL'
  - `history` AlertHistoryView[]
    - `alertId` string
    - `createdBy` string
    - `createdDate` string, date-time
    - `details` union
      - AlertCreatedDetailView: Details for the ALERT_CREATED event — a snapshot of the alert at the moment it was first raised
        - `evaluationType` string
        - `initialState` string
        - `observationKind` string
        - `severity` string
      - AssignedDetailView: Details for the ASSIGNED event
        - `assignedTo` string
        - `previousAssignee` string
      - CommentAddedDetailView: Details for the COMMENT_ADDED event — a comment added without an accompanying state transition
        - `reason` string
        - `comment` string
      - StateChangedDetailView: Details for the STATE_CHANGED event, optionally with a dismiss reason and/or comment
        - `oldState` string
        - `newState` string
        - `reason` string
        - `comment` string
      - ValueExcludedDetailView: Details for the VALUE_EXCLUDED event
        - `metricValueId` string
        - `reason` string
    - `eventType` 'ALERT_CREATED' | 'STATE_CHANGED' | 'COMMENT_ADDED' | 'ASSIGNED' | 'VALUE_EXCLUDED'
    - `id` string
  - `id` string
  - `lastModifiedBy` string
  - `lastModifiedDate` string, date-time
  - `metricTypeId` string
  - `metricValueId` string
  - `observationKind` string
  - `observerId` string
  - `severity` 'WARN' | 'CRITICAL' | 'ALERT'
  - `state` 'NEW' | 'OPEN' | 'IN_PROGRESS' | 'CLOSED'
  - `tags` string[]
  - `timestamp` string, date-time

## Other responses

- `400`: Invalid state transition or missing dismiss reason
- `404`: Alert not found
- `500`: Internal server error

---

[API](https://skmtc.dev/precisely/apis/verify-api-portal.md) · [All operations](https://skmtc.dev/precisely/apis/verify-api-portal/llms.txt) · [OpenAPI document](https://skmtc.dev/precisely/apis/verify-api-portal/revisions/380735465266?raw)
