> ## Documentation Index
> Fetch the complete documentation index at: https://docs.uptimeio.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Monitor

> Change the settings of an existing monitor

## Overview

Update one or more settings of a monitor. Send only the fields you want to change; everything else keeps its current value. The updated monitor is returned.

```
PUT https://api.uptimeio.com/api/monitors/{id}
```

<Warning>
  **A monitor's `type` is fixed when it is created.** You can send the monitor's current `type` again (the dashboard does on every save), but any other value is rejected. To monitor the same target a different way, [create a new monitor](/api-reference/monitors/create) and delete the old one.
</Warning>

## Authentication

| Header | Required | Description |
| - | - | - |
| `X-API-Key` | Yes (or a Bearer token) | Your API key with **read and write** access. Read-only keys receive `READ_ONLY_API_KEY` (403). See [Authentication](/api-reference/authentication). |
| `Content-Type` | Yes | `application/json` |
| `X-Project-ID` | No | Project that contains the monitor. Defaults to your organization's default project. |

Your role must be allowed to edit monitors, otherwise `INSUFFICIENT_PERMISSIONS` (403).

## Path parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | UUID | Yes | Monitor ID. |

## Request body

All fields are optional. Validation rules match [Create Monitor](/api-reference/monitors/create); the type-specific objects are described there.

| Field | Type | Description |
| - | - | - |
| `name` | string | 1-80 characters. |
| `type` | enum | Must equal the monitor's current type (see above). |
| `target` | string | New URL or host. Validated for the monitor's type. |
| `interval_seconds` | integer | 30-86400. You cannot lower it below your plan minimum (Free 300, Pro and Scale 60). |
| `timeout_ms` | integer | 1000-60000. Must be shorter than the check interval, including when only `interval_seconds` or only `timeout_ms` changes. |
| `monitoring_regions` | array of strings | `[]` for automatic selection, or location codes from `GET /api/regions`. Pinning locations requires Pro or Scale. |
| `group_id` | UUID or `null` | Move to a group, or `null` to remove from its group. |
| `tags` | array of strings | Replaces the existing tags. |
| `notification_target_ids` | array of UUIDs | Replaces the monitor's notification destinations. `[]` sends alerts nowhere. |
| `http_config`, `keyword_config`, `dns_config`, `tcp_config`, `icmp_config`, `heartbeat_config` | object | Type-specific settings. Use the object that matches the monitor's type. For `heartbeat_config`, `expected_interval_seconds` must be at least 60 and `grace_period_seconds` at most 3600; the same limits as on create apply. |
| `ssl_monitoring` | object | Certificate expiry warnings (`enabled`, `check_expiry`, `check_validity`, `expiry_warning_days`, `ignore_self_signed`). |
| `domain_monitoring` | object | `{ "enabled": boolean, "expiry_warning_days": [30, 15, 7, 1] }`. See [Domain expiry monitoring](/api-reference/monitors/create#domain-expiry-monitoring). |
| `verify_ssl` | boolean | Validate the TLS certificate on `HTTP` and `KEYWORD` checks. |
| `status` | enum | `active`, `paused` or `disabled`. Prefer the dedicated [pause](/api-reference/monitors/pause) and [resume](/api-reference/monitors/resume) endpoints. |

Domain expiry monitoring is re-checked against the monitor as it will be after the update, but only when the request touches `domain_monitoring`, `target` or `type`. Enabling it on a monitor whose target is not a publicly registered domain returns `VALIDATION_ERROR` with `details.field` set to `domain_monitoring`.

A plan limit is only enforced for what the request changes. A monitor that was configured on a higher plan keeps its settings after a downgrade, and you can still edit unrelated fields.

## Response

### 200 OK

```json theme={null}
{
  "success": true,
  "data": {
    "monitor": {
      "id": "b7a2c1de-3f54-4c21-9d0a-6e1f2a3b4c5d",
      "organization_id": "0c9e8d7f-1a2b-4c3d-8e9f-0a1b2c3d4e5f",
      "name": "Production API (EU)",
      "target": "https://api.example.com/health",
      "type": "HTTP",
      "interval_seconds": 120,
      "status": "active",
      "configState": "active",
      "runtimeStatus": "unknown",
      "created_at": 1767000000,
      "updated_at": 1767090000,
      "timeout_ms": 10000
    }
  }
}
```

The monitor object has the same shape as in [Get Monitor](/api-reference/monitors/get).

## Errors

### Changing the monitor type

```json theme={null}
{
  "success": false,
  "error": {
    "code": "VALIDATION_ERROR",
    "message": "Monitor type can't be changed from HTTP to DNS. To monitor this target another way, create a new monitor.",
    "details": { "field": "type" }
  }
}
```

HTTP status `400`.

### All errors

| Status | Code | Cause |
| - | - | - |
| 400 | `VALIDATION_ERROR` | A field is invalid, the target is not allowed, the `type` differs from the monitor's type, or `domain_monitoring` was enabled on an ineligible monitor. |
| 400 | `VALIDATION_FAILED` | `heartbeat_config.expected_interval_seconds` is below 60 seconds or `heartbeat_config.grace_period_seconds` is above 3600 seconds. |
| 400 | `INVALID_REGIONS` | A region code is unknown or has no active probe. |
| 400 | `MONITOR_UPDATE_FAILED` | The update could not be applied. |
| 401 | `AUTHENTICATION_REQUIRED` / `MISSING_AUTH` / `INVALID_API_KEY` | Missing or invalid credentials. |
| 403 | `READ_ONLY_API_KEY` | The key has read-only access. |
| 403 | `INSUFFICIENT_PERMISSIONS` | Your role cannot edit monitors. |
| 403 | `INTERVAL_TOO_SHORT` | The new interval (or heartbeat `expected_interval_seconds`) is shorter than your plan minimum and shorter than the monitor's current value. |
| 403 | `LOCATION_MONITORING_NOT_AVAILABLE` | Pinned locations were sent on the Free plan. |
| 403 | `DOMAIN_MONITORING_NOT_AVAILABLE`, `SSL_MONITORING_NOT_AVAILABLE`, `SLOW_RESPONSE_ALERTS_NOT_AVAILABLE`, `DNS_MONITORING_NOT_AVAILABLE`, `HEARTBEAT_MONITORING_NOT_AVAILABLE` | The feature is not included in your plan. |
| 404 | `MONITOR_NOT_FOUND` | No monitor with this ID in the project. |

## Example

<CodeGroup>
  ```bash cURL theme={null}
  curl -X PUT https://api.uptimeio.com/api/monitors/MONITOR_ID \
    -H "X-API-Key: YOUR_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "name": "Production API (EU)",
      "interval_seconds": 120,
      "domain_monitoring": { "enabled": true, "expiry_warning_days": [30, 7] }
    }'
  ```

  ```javascript JavaScript theme={null}
  const res = await fetch('https://api.uptimeio.com/api/monitors/MONITOR_ID', {
    method: 'PUT',
    headers: {
      'X-API-Key': process.env.UPTIMEIO_API_KEY,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({ name: 'Production API (EU)', interval_seconds: 120 }),
  });
  const { data } = await res.json();
  console.log(data.monitor.interval_seconds);
  ```

  ```python Python theme={null}
  import os
  import requests

  res = requests.put(
      "https://api.uptimeio.com/api/monitors/MONITOR_ID",
      headers={"X-API-Key": os.environ["UPTIMEIO_API_KEY"]},
      json={"name": "Production API (EU)", "interval_seconds": 120},
  )
  print(res.json()["data"]["monitor"]["interval_seconds"])
  ```
</CodeGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.