---
title: "Update Monitor"
method: PATCH
path: "/api/v1/monitors/{monitor_id}"
---

# Update Monitor

`PATCH /api/v1/monitors/{monitor_id}`

## Request

- Base URL: `https://api.mesharc.dev` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mesharc.dev/api/v1/monitors/{monitor_id}`
- Auth: none declared

Its name, schedule, status (active or paused) or webhook. A new
webhook's secret is returned here, once.

## Path parameters

- `monitor_id` string, required

## Headers

- `authorization` string, nullable
- `x-mesharc-tenant` string, nullable

## Request body

- MonitorUpdate
  - `name` string, nullable
  - `schedule` string, nullable
  - `status` string, nullable
  - `webhook` union
    - object
    - string
  - `budget` object, nullable
  - `alerts` object, nullable
  - `addToProject` string, nullable
  - `rows` union
    - object
    - boolean
  - `destination` string, nullable
  - `sentiment` union
    - object
    - boolean

## Response `200`

Successful Response

- Monitor
  - `id` string, required
  - `kind` string, required
  - `name` string, required
  - `request` object, required
  - `schedule` string, required
  - `status` string, required
  - `webhook` object, nullable
  - `budget` object, nullable
  - `spentThisMonth` integer
  - `alerts` object, nullable
  - `addToProject` string, nullable
  - `rows` object, nullable
  - `destination` string, nullable
  - `sentiment` object, nullable
  - `nextRunAt` string, nullable
  - `lastRunAt` string, nullable
  - `lastRun` MonitorRun
    - `id` string, required
    - `monitorId` string, required
    - `kind` string, required
    - `trigger` string, required
    - `status` string, required
    - `refId` string, required
    - `credits` integer, required
    - `answered` boolean, required
    - `changed` boolean, required
    - `summary` string, required
    - `diff` object, nullable
    - `error` string
    - `addedToProject` integer
    - `rows` object, nullable
    - `destinationSync` object, nullable
    - `triggeredBy` object, nullable
    - `partial` boolean
    - `sentimentPending` boolean
    - `createdAt` string, nullable
    - `finishedAt` string, nullable
  - `createdAt` string, nullable
  - `webhookSecret` string, nullable

## Other responses

- `422`: Validation Error

---

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