---
title: "Update a project monitor"
method: PATCH
path: "/v1/projects/{projectId}/monitors/{alertId}"
tags: ["Monitors"]
---

# Update a project monitor

`PATCH /v1/projects/{projectId}/monitors/{alertId}`

## Request

- Base URL: `https://api.spice.ai`
- URL: `https://api.spice.ai/v1/projects/{projectId}/monitors/{alertId}`
- Auth: HTTP bearer

Updates a project monitor. Requires `monitors:write` and organization admin privileges.

## Path parameters

- `projectId` integer, required
- `alertId` string, uuid, required

## Headers

- `X-Org-Name` string

## Request body

- object
  - `name` string
  - `description` string, nullable
  - `status` 'active' | 'disabled'
  - `templateId` string
  - `spec` object
  - `target` union: A notification sink in a create or update request. Cluster monitors, project monitors and data reactions accept the same shape.
    - EmailSinkInput
      - `type` 'email', required
      - `recipientUserIds` integer[]: Organization members to email, by user ID.
      - `emails` string[]
    - HttpSinkInput
      - `type` 'http', required
      - `url` string, uri, required: The URL each notification is sent to, using `method`. Must be https and must resolve to a public address.
      - `method` 'POST' | 'PUT' | 'PATCH': A create that omits it uses POST. An update that omits it keeps the stored method.
      - `token` string: Bearer token sent with each delivery. Stored encrypted and never returned.
    - SlackSinkInput
      - `type` 'slack', required
      - `channelId` string, required: Slack conversation id. The organization must already have Slack connected.
      - `channelName` string
  - `recipientUserIds` integer[]

## Response `200`

Monitor updated

## Other responses

- `400`: Invalid request or monitor ID
- `401`: Unauthorized
- `403`: Insufficient scope or role
- `404`: Project or monitor not found
- `409`: Duplicate monitor name or monitor changed during update
- `413`: Request body too large
- `422`: Destination is unavailable or project configuration is incomplete
- `500`: Internal server error
- `502`: Monitor backend update failed

---

[API](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api.md) - [All operations](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/llms.txt) - [OpenAPI document](https://skmtc.dev/spice/apis/spice-cloud-control-plane-api/revisions/5f3b75dd847d?raw)
