# Silence a monitor for a window

`PUT https://evohub.io/api/v1/monitors/{id}/silence`

Part of the [Uptime API](https://docs-dev.evohub.io/uptime.md) reference · operationId `setMonitorSilence`.

Mutes the monitor's alerts from `starts_at` until `ends_at`, for
planned work that takes it down on purpose. A monitor has one window;
setting a new one replaces it.

Requires the `uptime:silence:write` scope.

## Authorization

Any one of:

- `bearerKey`
- `headerKey`

Where:

- `bearerKey`: HTTP Bearer — An EvoHub API key (`evohub_…`) as a bearer token.
- `headerKey`: API key in the header `X-API-Key` — An EvoHub API key (`evohub_…`).

## Path parameters

- `id` (string, required, example `mon_8c1d0b52-6f3e-4a7d-9b21-0e5c4f7a3d19`): The monitor's ID.

## Request body (required)

Content type: `application/json`

Type: `object`

- `starts_at` (string (date-time), required)
- `ends_at` (string (date-time), required): Must be after `starts_at`.

## Responses

### 200 — The window as saved.

Content type: `application/json`

Type: `object`

- `data` (MonitorSilence)
  - `monitor_id` (string)
  - `org_id` (string)
  - `starts_at` (string (date-time))
  - `ends_at` (string (date-time))
  - `created_at` (string (date-time))

### 400 — The body is not valid JSON or a time is not RFC 3339 (`INVALID_BODY`), or a time is missing or `ends_at` is not after `starts_at` (`VALIDATION`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 401 — No API key was sent, or it is unknown, revoked or expired (`UNAUTHORIZED`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 403 — The key lacks the scope this endpoint needs (`FORBIDDEN`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 404 — The monitor does not exist, or belongs to a team the caller cannot see (`MONITOR_NOT_FOUND`).

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 429 — Too many requests (`RATE_LIMITED`). Wait for `Retry-After` seconds.

Headers:

- `Retry-After` (integer): Seconds to wait before retrying.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

### 500 — Something went wrong on EvoHub's side (`INTERNAL_ERROR`). Retry later.

Content type: `application/json`

Type: `Error`

- `error` (object, required)
  - `code` (string, required, example `MONITOR_NOT_FOUND`)
  - `message` (string, required, example `monitor not found`)
  - `request_id` (string)

## Example request

```bash
curl -X PUT 'https://evohub.io/api/v1/monitors/mon_8c1d0b52-6f3e-4a7d-9b21-0e5c4f7a3d19/silence' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer <TOKEN>' \
  -d '{
  "ends_at": "2026-10-13T00:00:00Z",
  "starts_at": "2026-10-12T22:00:00Z"
}'
```
