---
title: Update a monitor
slug: monitor/update-a-monitor
docTags: 
createdAt: 2025-04-09T07:16:38.388Z
---

:::ApiMethodV2
```json
{
  "name": "Update a monitor ",
  "method": "PUT",
  "url": "https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}",
  "description": "Update a monitor base information by monitor ID",
  "tab": "examples",
  "examples": {
    "languages": [
      {
        "id": "Me9clfbyy_ayvFypgakKS",
        "language": "curl",
        "code": "curl --location --globoff --request PUT 'https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}' \\\n--header 'Authorization: string' \\\n--data '{\"name\":\"String\",\"onlineStatus\":\"String\",\"monitorWeekDays\":\"Array\",\"monitorFrequency\":\"Number\",\"notificationEmails\":\"Array\"}'",
        "customLabel": ""
      },
      {
        "id": "kjPFNZqcHf_rrrucO_Mah",
        "language": "nodejs",
        "code": "var request = require('request');\nvar options = {\n   'method': 'PUT',\n   'url': 'https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}',\n   'headers': {\n      'Authorization': 'string'\n   },\n   body: '{\"name\":\"String\",\"onlineStatus\":\"String\",\"monitorWeekDay\":\"String\",\"monitorTimes\":\"String\",\"notificationEmails\":\"String\"}'\n\n};\nrequest(options, function (error, response) {\n   if (error) throw new Error(error);\n   console.log(response.body);\n});\n",
        "customLabel": ""
      },
      {
        "id": "ZmyxslTIStyJX27pJBSpq",
        "language": "javascript",
        "code": "var myHeaders = new Headers();\nmyHeaders.append(\"Authorization\", \"string\");\n\nvar raw = \"{\\\"name\\\":\\\"String\\\",\\\"onlineStatus\\\":\\\"String\\\",\\\"monitorWeekDay\\\":\\\"String\\\",\\\"monitorTimes\\\":\\\"String\\\",\\\"notificationEmails\\\":\\\"String\\\"}\";\n\nvar requestOptions = {\n   method: 'PUT',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));",
        "customLabel": ""
      },
      {
        "id": "z7UbSwy6WUW2xGepqrwxb",
        "language": "python",
        "code": "import requests\n\nurl = \"https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}\"\n\npayload = \"{\\\"name\\\":\\\"String\\\",\\\"onlineStatus\\\":\\\"String\\\",\\\"monitorWeekDay\\\":\\\"String\\\",\\\"monitorTimes\\\":\\\"String\\\",\\\"notificationEmails\\\":\\\"String\\\"}\"\nheaders = {\n   'Authorization': 'string'\n}\n\nresponse = requests.request(\"PUT\", url, headers=headers, data=payload)\n\nprint(response.text)\n",
        "customLabel": ""
      },
      {
        "id": "Rv_2LMGgH91q5lXetJCDS",
        "language": "ruby",
        "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api-sandbox.klavi.ai/monitor/v1/monitors/{id}\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Put.new(url)\nrequest[\"Authorization\"] = \"string\"\nrequest.body = \"{\\\"name\\\":\\\"String\\\",\\\"onlineStatus\\\":\\\"String\\\",\\\"monitorWeekDay\\\":\\\"String\\\",\\\"monitorTimes\\\":\\\"String\\\",\\\"notificationEmails\\\":\\\"String\\\"}\"\n\nresponse = https.request(request)\nputs response.read_body\n",
        "customLabel": ""
      }
    ],
    "selectedLanguageId": "Me9clfbyy_ayvFypgakKS"
  },
  "results": {
    "languages": [
      {
        "id": "51MScC1gCOqAoRVXUFT83",
        "language": "200",
        "customLabel": "",
        "code": "{\n  \"id\": \"64a8c71f-71db-4972-82b1-1aadc5434dd8\"\n}"
      }
    ],
    "selectedLanguageId": "51MScC1gCOqAoRVXUFT83"
  },
  "request": {
    "pathParameters": [
      {
        "name": "id",
        "kind": "required",
        "type": "string",
        "description": "ID of the monitor",
        "": "ID of the monitor"
      }
    ],
    "queryParameters": [],
    "headerParameters": [
      {
        "name": "Authorization",
        "kind": "required",
        "type": "string",
        "description": "Bearer access token, it returned by the /auth",
        "": "Bearer access token, it returned by the /auth"
      }
    ],
    "bodyDataParameters": [
      {
        "name": "name",
        "kind": "required",
        "type": "string",
        "description": "Name of the monitor",
        "": "required"
      },
      {
        "name": "onlineStatus",
        "kind": "required",
        "type": "boolean",
        "description": "Monitor status: true/false",
        "": "required"
      },
      {
        "name": "monitorWeekDays",
        "kind": "required",
        "type": "array",
        "description": "Monitoring dates within a week:  [\"MON\",\"TUE\",\"WED\",\"THU\",\"FRI\",\"SAT\",\"SUN\"]",
        "": "required"
      },
      {
        "name": "monitorFrequency",
        "kind": "required",
        "type": "number",
        "description": "Daily monitoring frequency: [1, 2]\n",
        "": "required"
      },
      {
        "name": "notificationEmails",
        "kind": "optional",
        "type": "array",
        "description": "Mailing list for sending notifications, the mail must be created in advance in the Klavi Console",
        "": "Mailing list for sending notifications, the mail must be created in advance in the Klavi Console"
      }
    ],
    "formDataParameters": []
  },
  "currentNewParameter": {
    "label": "Header Parameter",
    "value": "headerParameters"
  },
  "hasTryItOut": false,
  "response": [
    {
      "name": "id",
      "kind": "optional",
      "type": "string",
      "description": "ID of the monitor"
    }
  ]
}
```
:::

