PUT /monitors/{id}

Authentication

Bearer Token (hu_api_key)

Path Parameters

id string required path

Request Body required

application/json
name string
Min length 1Max length 100
type string
Values http ping tcp dns keyword heartbeat
url string (uri) | null
Any of:
Option 1string (uri)
Option 2null
method string
Values GET POST PUT DELETE PATCH HEAD OPTIONS
headers object | null
Any of:
Option 1object
Option 2null
body string | null
Any of:
Option 1string
Option 2null
interval_seconds integer
Min 30Max 3600
timeout_ms integer
Min 1000Max 60000
regions string[]
Values us-east us-west eu-west eu-central ap-southeast ap-northeast
assertions object[] | null
Any of:
Option 1
Array of:
type string REQUIRED
operator string REQUIRED
value string REQUIRED
Option 2null
keyword string | null
Any of:
Option 1string
Option 2null
keyword_type string
Values contains not_contains regex
ssl_check boolean
domain_check boolean
screenshot_on_failure boolean
screenshot_compare boolean
retry_count integer
Min 0Max 5
tags string[] | null
Any of:
Option 1
Array of: string
Option 2null

Responses

200 Monitor updated
application/json
data object
name string REQUIRED
type string REQUIRED
Values http ping tcp dns keyword heartbeat
url string (uri)
method string REQUIRED
Values GET POST PUT DELETE PATCH HEAD OPTIONS
headers object
body string
interval_seconds integer REQUIRED
timeout_ms integer REQUIRED
regions string[] REQUIRED
Values us-east us-west eu-west eu-central ap-southeast ap-northeast
assertions object[]
Array of:
type string REQUIRED
operator string REQUIRED
value string REQUIRED
auth_type string
Values basic bearer header
auth_config object
keyword string
keyword_type string REQUIRED
Values contains not_contains regex
heartbeat_interval integer
heartbeat_grace integer
ssl_check boolean REQUIRED
domain_check boolean REQUIRED
screenshot_on_failure boolean REQUIRED
screenshot_compare boolean REQUIRED
screenshot_threshold number REQUIRED
retry_count integer REQUIRED
tags string[]
404 Not found
curl -X PUT 'https://happyuptime.com/api/v1/monitors/string' \  -H 'Authorization: Bearer YOUR_API_TOKEN' \  -H 'Content-Type: application/json' \  -d '{  "name": "string",  "type": "http",  "url": "https://example.com",  "method": "GET",  "headers": {},  "body": "string",  "interval_seconds": 30,  "timeout_ms": 1000,  "regions": [    "us-east"  ],  "assertions": [    {      "type": "string",      "operator": "string",      "value": "string"    }  ],  "keyword": "string",  "keyword_type": "contains",  "ssl_check": true,  "domain_check": true,  "screenshot_on_failure": true,  "screenshot_compare": true,  "retry_count": 0,  "tags": [    "string"  ]}'
const response = await fetch('https://happyuptime.com/api/v1/monitors/string', {  method: 'PUT',  headers: {      "Authorization": "Bearer YOUR_API_TOKEN",      "Content-Type": "application/json"  },  body: JSON.stringify({    "name": "string",    "type": "http",    "url": "https://example.com",    "method": "GET",    "headers": {},    "body": "string",    "interval_seconds": 30,    "timeout_ms": 1000,    "regions": [      "us-east"    ],    "assertions": [      {        "type": "string",        "operator": "string",        "value": "string"      }    ],    "keyword": "string",    "keyword_type": "contains",    "ssl_check": true,    "domain_check": true,    "screenshot_on_failure": true,    "screenshot_compare": true,    "retry_count": 0,    "tags": [      "string"    ]  })});const data = await response.json();console.log(data);
import requestsheaders = {    'Authorization': 'Bearer YOUR_API_TOKEN'}response = requests.put('https://happyuptime.com/api/v1/monitors/string', headers=headers, json={  "name": "string",  "type": "http",  "url": "https://example.com",  "method": "GET",  "headers": {},  "body": "string",  "interval_seconds": 30,  "timeout_ms": 1000,  "regions": [    "us-east"  ],  "assertions": [    {      "type": "string",      "operator": "string",      "value": "string"    }  ],  "keyword": "string",  "keyword_type": "contains",  "ssl_check": true,  "domain_check": true,  "screenshot_on_failure": true,  "screenshot_compare": true,  "retry_count": 0,  "tags": [    "string"  ]})print(response.json())
200 Response
{  "data": {    "name": "<string>",    "type": "http",    "url": "<uri>",    "method": "GET",    "headers": "<object>",    "body": "<string>",    "interval_seconds": 123,    "timeout_ms": 123,    "regions": [      "us-east"    ],    "assertions": [      {        "type": "<string>",        "operator": "<string>",        "value": "<string>"      }    ],    "auth_type": "basic",    "auth_config": "<object>",    "keyword": "<string>",    "keyword_type": "contains",    "heartbeat_interval": 123,    "heartbeat_grace": 123,    "ssl_check": true,    "domain_check": true,    "screenshot_on_failure": true,    "screenshot_compare": true,    "screenshot_threshold": 123,    "retry_count": 123,    "tags": [      "<string>"    ]  }}
Ask a question... ⌘I