# Update a Heartbeat monitor - Checkly Docs

> Updates a Heartbeat check.

Source: https://www.checklyhq.com/docs/api-reference/heartbeats/update-a-heartbeat-check/

---

Update a heartbeat check

```
curl --request PUT \
--url https://api.checklyhq.com/v1/checks/heartbeat/{id} \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Check",
"activated": true,
"muted": true,
"doubleCheck": true,
"shouldFail": true,
"locations": [
"us-east-1",
"eu-central-1"
],
"tags": [
"production"
],
"alertSettings": {
"reminders": {},
"sslCertificates": {
"enabled": true,
"alertThreshold": 123
},
"runBasedEscalation": {},
"timeBasedEscalation": {},
"parallelRunFailureThreshold": {
"enabled": true
}
},
"useGlobalAlertSettings": true,
"groupId": null,
"groupOrder": null,
"alertChannelSubscriptions": [],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": " ",
"description": " ",
"notifySubscribers": true
},
"runParallel": true,
"description": " ",
"intent": {
"goal": " ",
"requiredOutcomes": [],
"mustPreserve": []
},
"aiAutoRepairEnabled": true,
"checkType": "HEARTBEAT",
"frequencyOffset": 2,
"request": {},
"script": " ",
"scriptPath": " ",
"sslCheckDomain": " ",
"environmentVariables": [
{
"key": "API_KEY",
"value": " ",
"locked": true,
"secret": true
}
],
"setupSnippetId": 123,
"tearDownSnippetId": 123,
"localSetupScript": " ",
"localTearDownScript": " ",
"degradedResponseTime": 150000,
"maxResponseTime": 150000
}
'
```

```
import requests

url = "https://api.checklyhq.com/v1/checks/heartbeat/{id}"

payload = {
"name": "Check",
"activated": True,
"muted": True,
"doubleCheck": True,
"shouldFail": True,
"locations": ["us-east-1", "eu-central-1"],
"tags": ["production"],
"alertSettings": {
"reminders": {},
"sslCertificates": {
"enabled": True,
"alertThreshold": 123
},
"runBasedEscalation": {},
"timeBasedEscalation": {},
"parallelRunFailureThreshold": { "enabled": True }
},
"useGlobalAlertSettings": True,
"groupId": None,
"groupOrder": None,
"alertChannelSubscriptions": [],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": " ",
"description": " ",
"notifySubscribers": True
},
"runParallel": True,
"description": " ",
"intent": {
"goal": " ",
"requiredOutcomes": [],
"mustPreserve": []
},
"aiAutoRepairEnabled": True,
"checkType": "HEARTBEAT",
"frequencyOffset": 2,
"request": {},
"script": " ",
"scriptPath": " ",
"sslCheckDomain": " ",
"environmentVariables": [
{
"key": "API_KEY",
"value": " ",
"locked": True,
"secret": True
}
],
"setupSnippetId": 123,
"tearDownSnippetId": 123,
"localSetupScript": " ",
"localTearDownScript": " ",
"degradedResponseTime": 150000,
"maxResponseTime": 150000
}
headers = {
"Authorization": "Bearer ",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

```
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Check',
activated: true,
muted: true,
doubleCheck: true,
shouldFail: true,
locations: ['us-east-1', 'eu-central-1'],
tags: ['production'],
alertSettings: {
reminders: {},
sslCertificates: {enabled: true, alertThreshold: 123},
runBasedEscalation: {},
timeBasedEscalation: {},
parallelRunFailureThreshold: {enabled: true}
},
useGlobalAlertSettings: true,
groupId: null,
groupOrder: null,
alertChannelSubscriptions: [],
triggerIncident: {
serviceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: ' ',
description: ' ',
notifySubscribers: true
},
runParallel: true,
description: ' ',
intent: {goal: ' ', requiredOutcomes: [], mustPreserve: []},
aiAutoRepairEnabled: true,
checkType: 'HEARTBEAT',
frequencyOffset: 2,
request: {},
script: ' ',
scriptPath: ' ',
sslCheckDomain: ' ',
environmentVariables: [{key: 'API_KEY', value: ' ', locked: true, secret: true}],
setupSnippetId: 123,
tearDownSnippetId: 123,
localSetupScript: ' ',
localTearDownScript: ' ',
degradedResponseTime: 150000,
maxResponseTime: 150000
})
};

fetch('https://api.checklyhq.com/v1/checks/heartbeat/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
```

```
"https://api.checklyhq.com/v1/checks/heartbeat/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Check',
'activated' => true,
'muted' => true,
'doubleCheck' => true,
'shouldFail' => true,
'locations' => [
'us-east-1',
'eu-central-1'
],
'tags' => [
'production'
],
'alertSettings' => [
'reminders' => [

],
'sslCertificates' => [
'enabled' => true,
'alertThreshold' => 123
],
'runBasedEscalation' => [

],
'timeBasedEscalation' => [

],
'parallelRunFailureThreshold' => [
'enabled' => true
]
],
'useGlobalAlertSettings' => true,
'groupId' => null,
'groupOrder' => null,
'alertChannelSubscriptions' => [

],
'triggerIncident' => [
'serviceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => ' ',
'description' => ' ',
'notifySubscribers' => true
],
'runParallel' => true,
'description' => ' ',
'intent' => [
'goal' => ' ',
'requiredOutcomes' => [

],
'mustPreserve' => [

]
],
'aiAutoRepairEnabled' => true,
'checkType' => 'HEARTBEAT',
'frequencyOffset' => 2,
'request' => [

],
'script' => ' ',
'scriptPath' => ' ',
'sslCheckDomain' => ' ',
'environmentVariables' => [
[
'key' => 'API_KEY',
'value' => ' ',
'locked' => true,
'secret' => true
]
],
'setupSnippetId' => 123,
'tearDownSnippetId' => 123,
'localSetupScript' => ' ',
'localTearDownScript' => ' ',
'degradedResponseTime' => 150000,
'maxResponseTime' => 150000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
```

```
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.checklyhq.com/v1/checks/heartbeat/{id}"

payload := strings.NewReader("{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
```

```
HttpResponse response = Unirest.put("https://api.checklyhq.com/v1/checks/heartbeat/{id}")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}")
.asString();
```

```
require 'uri'
require 'net/http'

url = URI("https://api.checklyhq.com/v1/checks/heartbeat/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}"

response = http.request(request)
puts response.read_body
```

```
{
"name": " ",
"id": " ",
"activated": true,
"muted": false,
"tags": [
" "
],
"alertSettings": {
"escalationType": "RUN_BASED",
"runBasedEscalation": {
"failedRunThreshold": 1
},
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"useGlobalAlertSettings": true,
"alertChannelSubscriptions": [
{
"alertChannelId": 123,
"activated": true
}
],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"severity": "CRITICAL",
"name": " ",
"description": " ",
"notifySubscribers": true
},
"runParallel": false,
"description": null,
"intent": null,
"aiAutoRepairEnabled": null,
"checkType": "HEARTBEAT",
"heartbeat": {
"period": 123,
"periodUnit": "seconds",
"grace": 123,
"graceUnit": "seconds",
"pingToken": " ",
"pingUrl": " "
},
"alertChannels": {
"email": [
{
"address": ""
}
],
"webhook": [
{
"url": "",
"name": "",
"method": "POST",
"headers": [
{
"key": " ",
"value": "",
"locked": false
}
],
"queryParameters": [
{
"key": " ",
"value": "",
"locked": false
}
]
}
],
"slack": [
{
"url": ""
}
],
"sms": [
{
"number": "+549110000000",
"name": "SMS Alert"
}
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Bad Token",
"attributes": {}
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 403,
"error": "Forbidden",
"message": "Forbidden",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
```

```
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too Many Requests",
"attributes": {}
}
```

Heartbeat Monitor

# Update a Heartbeat monitor

Updates a Heartbeat check.

PUT

/

v1

/

checks

/

heartbeat

/

{id}

Update a heartbeat check

```
curl --request PUT \
--url https://api.checklyhq.com/v1/checks/heartbeat/{id} \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Check",
"activated": true,
"muted": true,
"doubleCheck": true,
"shouldFail": true,
"locations": [
"us-east-1",
"eu-central-1"
],
"tags": [
"production"
],
"alertSettings": {
"reminders": {},
"sslCertificates": {
"enabled": true,
"alertThreshold": 123
},
"runBasedEscalation": {},
"timeBasedEscalation": {},
"parallelRunFailureThreshold": {
"enabled": true
}
},
"useGlobalAlertSettings": true,
"groupId": null,
"groupOrder": null,
"alertChannelSubscriptions": [],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": " ",
"description": " ",
"notifySubscribers": true
},
"runParallel": true,
"description": " ",
"intent": {
"goal": " ",
"requiredOutcomes": [],
"mustPreserve": []
},
"aiAutoRepairEnabled": true,
"checkType": "HEARTBEAT",
"frequencyOffset": 2,
"request": {},
"script": " ",
"scriptPath": " ",
"sslCheckDomain": " ",
"environmentVariables": [
{
"key": "API_KEY",
"value": " ",
"locked": true,
"secret": true
}
],
"setupSnippetId": 123,
"tearDownSnippetId": 123,
"localSetupScript": " ",
"localTearDownScript": " ",
"degradedResponseTime": 150000,
"maxResponseTime": 150000
}
'
```

```
import requests

url = "https://api.checklyhq.com/v1/checks/heartbeat/{id}"

payload = {
"name": "Check",
"activated": True,
"muted": True,
"doubleCheck": True,
"shouldFail": True,
"locations": ["us-east-1", "eu-central-1"],
"tags": ["production"],
"alertSettings": {
"reminders": {},
"sslCertificates": {
"enabled": True,
"alertThreshold": 123
},
"runBasedEscalation": {},
"timeBasedEscalation": {},
"parallelRunFailureThreshold": { "enabled": True }
},
"useGlobalAlertSettings": True,
"groupId": None,
"groupOrder": None,
"alertChannelSubscriptions": [],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"name": " ",
"description": " ",
"notifySubscribers": True
},
"runParallel": True,
"description": " ",
"intent": {
"goal": " ",
"requiredOutcomes": [],
"mustPreserve": []
},
"aiAutoRepairEnabled": True,
"checkType": "HEARTBEAT",
"frequencyOffset": 2,
"request": {},
"script": " ",
"scriptPath": " ",
"sslCheckDomain": " ",
"environmentVariables": [
{
"key": "API_KEY",
"value": " ",
"locked": True,
"secret": True
}
],
"setupSnippetId": 123,
"tearDownSnippetId": 123,
"localSetupScript": " ",
"localTearDownScript": " ",
"degradedResponseTime": 150000,
"maxResponseTime": 150000
}
headers = {
"Authorization": "Bearer ",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
```

```
const options = {
method: 'PUT',
headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Check',
activated: true,
muted: true,
doubleCheck: true,
shouldFail: true,
locations: ['us-east-1', 'eu-central-1'],
tags: ['production'],
alertSettings: {
reminders: {},
sslCertificates: {enabled: true, alertThreshold: 123},
runBasedEscalation: {},
timeBasedEscalation: {},
parallelRunFailureThreshold: {enabled: true}
},
useGlobalAlertSettings: true,
groupId: null,
groupOrder: null,
alertChannelSubscriptions: [],
triggerIncident: {
serviceId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
name: ' ',
description: ' ',
notifySubscribers: true
},
runParallel: true,
description: ' ',
intent: {goal: ' ', requiredOutcomes: [], mustPreserve: []},
aiAutoRepairEnabled: true,
checkType: 'HEARTBEAT',
frequencyOffset: 2,
request: {},
script: ' ',
scriptPath: ' ',
sslCheckDomain: ' ',
environmentVariables: [{key: 'API_KEY', value: ' ', locked: true, secret: true}],
setupSnippetId: 123,
tearDownSnippetId: 123,
localSetupScript: ' ',
localTearDownScript: ' ',
degradedResponseTime: 150000,
maxResponseTime: 150000
})
};

fetch('https://api.checklyhq.com/v1/checks/heartbeat/{id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
```

```
"https://api.checklyhq.com/v1/checks/heartbeat/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Check',
'activated' => true,
'muted' => true,
'doubleCheck' => true,
'shouldFail' => true,
'locations' => [
'us-east-1',
'eu-central-1'
],
'tags' => [
'production'
],
'alertSettings' => [
'reminders' => [

],
'sslCertificates' => [
'enabled' => true,
'alertThreshold' => 123
],
'runBasedEscalation' => [

],
'timeBasedEscalation' => [

],
'parallelRunFailureThreshold' => [
'enabled' => true
]
],
'useGlobalAlertSettings' => true,
'groupId' => null,
'groupOrder' => null,
'alertChannelSubscriptions' => [

],
'triggerIncident' => [
'serviceId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'name' => ' ',
'description' => ' ',
'notifySubscribers' => true
],
'runParallel' => true,
'description' => ' ',
'intent' => [
'goal' => ' ',
'requiredOutcomes' => [

],
'mustPreserve' => [

]
],
'aiAutoRepairEnabled' => true,
'checkType' => 'HEARTBEAT',
'frequencyOffset' => 2,
'request' => [

],
'script' => ' ',
'scriptPath' => ' ',
'sslCheckDomain' => ' ',
'environmentVariables' => [
[
'key' => 'API_KEY',
'value' => ' ',
'locked' => true,
'secret' => true
]
],
'setupSnippetId' => 123,
'tearDownSnippetId' => 123,
'localSetupScript' => ' ',
'localTearDownScript' => ' ',
'degradedResponseTime' => 150000,
'maxResponseTime' => 150000
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer ",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
```

```
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.checklyhq.com/v1/checks/heartbeat/{id}"

payload := strings.NewReader("{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("Authorization", "Bearer ")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
```

```
HttpResponse response = Unirest.put("https://api.checklyhq.com/v1/checks/heartbeat/{id}")
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}")
.asString();
```

```
require 'uri'
require 'net/http'

url = URI("https://api.checklyhq.com/v1/checks/heartbeat/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer '
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Check\",\n \"activated\": true,\n \"muted\": true,\n \"doubleCheck\": true,\n \"shouldFail\": true,\n \"locations\": [\n \"us-east-1\",\n \"eu-central-1\"\n ],\n \"tags\": [\n \"production\"\n ],\n \"alertSettings\": {\n \"reminders\": {},\n \"sslCertificates\": {\n \"enabled\": true,\n \"alertThreshold\": 123\n },\n \"runBasedEscalation\": {},\n \"timeBasedEscalation\": {},\n \"parallelRunFailureThreshold\": {\n \"enabled\": true\n }\n },\n \"useGlobalAlertSettings\": true,\n \"groupId\": null,\n \"groupOrder\": null,\n \"alertChannelSubscriptions\": [],\n \"triggerIncident\": {\n \"serviceId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"name\": \" \",\n \"description\": \" \",\n \"notifySubscribers\": true\n },\n \"runParallel\": true,\n \"description\": \" \",\n \"intent\": {\n \"goal\": \" \",\n \"requiredOutcomes\": [],\n \"mustPreserve\": []\n },\n \"aiAutoRepairEnabled\": true,\n \"checkType\": \"HEARTBEAT\",\n \"frequencyOffset\": 2,\n \"request\": {},\n \"script\": \" \",\n \"scriptPath\": \" \",\n \"sslCheckDomain\": \" \",\n \"environmentVariables\": [\n {\n \"key\": \"API_KEY\",\n \"value\": \" \",\n \"locked\": true,\n \"secret\": true\n }\n ],\n \"setupSnippetId\": 123,\n \"tearDownSnippetId\": 123,\n \"localSetupScript\": \" \",\n \"localTearDownScript\": \" \",\n \"degradedResponseTime\": 150000,\n \"maxResponseTime\": 150000\n}"

response = http.request(request)
puts response.read_body
```

```
{
"name": " ",
"id": " ",
"activated": true,
"muted": false,
"tags": [
" "
],
"alertSettings": {
"escalationType": "RUN_BASED",
"runBasedEscalation": {
"failedRunThreshold": 1
},
"reminders": {
"amount": 0,
"interval": 5
},
"parallelRunFailureThreshold": {
"enabled": false,
"percentage": 10
}
},
"useGlobalAlertSettings": true,
"alertChannelSubscriptions": [
{
"alertChannelId": 123,
"activated": true
}
],
"triggerIncident": {
"serviceId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"severity": "CRITICAL",
"name": " ",
"description": " ",
"notifySubscribers": true
},
"runParallel": false,
"description": null,
"intent": null,
"aiAutoRepairEnabled": null,
"checkType": "HEARTBEAT",
"heartbeat": {
"period": 123,
"periodUnit": "seconds",
"grace": 123,
"graceUnit": "seconds",
"pingToken": " ",
"pingUrl": " "
},
"alertChannels": {
"email": [
{
"address": ""
}
],
"webhook": [
{
"url": "",
"name": "",
"method": "POST",
"headers": [
{
"key": " ",
"value": "",
"locked": false
}
],
"queryParameters": [
{
"key": " ",
"value": "",
"locked": false
}
]
}
],
"slack": [
{
"url": ""
}
],
"sms": [
{
"number": "+549110000000",
"name": "SMS Alert"
}
]
},
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 401,
"error": "Unauthorized",
"message": "Bad Token",
"attributes": {}
}
```

```
{
"statusCode": 123,
"error": " ",
"message": " ",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 403,
"error": "Forbidden",
"message": "Forbidden",
"errorCode": "ERR_ACCOUNT_NOT_ACCESSIBLE"
}
```

```
{
"statusCode": 404,
"error": "Not Found",
"message": "Not Found"
}
```

```
{
"statusCode": 429,
"error": "Too Many Requests",
"message": "Too Many Requests",
"attributes": {}
}
```

#### Authorizations

​

Authorization

string

header

required

The Checkly Public API uses API keys to authenticate requests. You can get the API Key [here](https://app.checklyhq.com/settings/user/api-keys).
Your API key is like a password:
keep it secure!

Authentication to the API is performed using the Bearer auth method in the Authorization header and using the account ID.

For example, set Authorization header while using cURL: `curl -H "Authorization: Bearer [apiKey]" "X-Checkly-Account: [accountId]"`

#### Headers

​

x-checkly-account

string

Your Checkly account ID, you can find it at [https://app.checklyhq.com/settings/account/general](https://app.checklyhq.com/settings/account/general)

#### Path Parameters

​

id

string

required

#### Query Parameters

​

autoAssignAlerts

boolean

default: true

Determines whether a new check will automatically be added as a subscriber to all existing alert channels when it gets created.

#### Body

application/json

​

name

string

The name of the check.

Minimum string length: `1`

Example: `"Check"`

​

activated

boolean

Determines if the check is running or not.

​

muted

boolean

Determines if any notifications will be send out when a check fails and/or recovers.

​

doubleCheck

boolean

[Deprecated] Retry failed check runs. This property is deprecated, and `retryStrategy` can be used instead.

​

shouldFail

boolean

Allows to invert the behaviour of when a check is considered to fail. Allows for validating error status like 404.

​

locations

enum<string>[] | null

An array of one or more data center locations where to run this check.

Available options: `us-east-1`,

`us-east-2`,

`us-west-1`,

`us-west-2`,

`ca-central-1`,

`sa-east-1`,

`eu-west-1`,

`eu-central-1`,

`eu-west-2`,

`eu-west-3`,

`eu-north-1`,

`eu-south-1`,

`me-south-1`,

`ap-southeast-1`,

`ap-northeast-1`,

`ap-east-1`,

`ap-southeast-2`,

`ap-southeast-3`,

`ap-northeast-2`,

`ap-northeast-3`,

`ap-south-1`,

`af-south-1`

Example:

```
["us-east-1", "eu-central-1"]
```

​

tags

string[]

Tags for organizing and filtering checks.

Minimum string length: `1`

Example:

```
["production"]
```

​

alertSettings

object

Alert settings.

Show child attributes

​

useGlobalAlertSettings

boolean

When true, the account level alert setting will be used, not the alert setting defined on this check.

​

groupId

number | null

The id of the check group this check is part of.

Example: `null`

​

groupOrder

number | null

The position of this check in a check group. It determines in what order checks are run when a group is triggered from the API or from CI/CD.

Required range: `x >= 0`

Example: `null`

​

runtimeId

enum<string> | null

The runtime version, i.e. fixed set of runtime dependencies, used to execute this check.

Available options: `2026.04`,

`2025.04`,

`2024.09`,

`2024.02`,

`2023.09`,

`2023.02`,

`2022.10`,

`null`

​

alertChannelSubscriptions

object[]

List of alert channel subscriptions.

Show child attributes

Example:

```
[]
```

​

triggerIncident

object | null

Determines whether the check or monitor should create and resolve an incident based on its alert configuration. Useful for status page automation.

Show child attributes

​

runParallel

boolean

When true, the check will run in parallel in all selected locations.

​

description

string | null

A description of the check.

Maximum string length: `510`

​

intent

object | null

Show child attributes

​

aiAutoRepairEnabled

boolean | null

​

checkType

enum<string>

Available options: `HEARTBEAT`

​

frequency

enum<integer>

How often the check should run in minutes.

Available options: `0`,

`1`,

`2`,

`5`,

`10`,

`15`,

`30`,

`60`,

`120`,

`180`,

`360`,

`720`,

`1440`

​

frequencyOffset

integer

Required range: `x >= 1`

​

request

object | null

​

heartbeat

object

Show child attributes

​

script

string | null

​

scriptPath

string | null

Path of the script in the runtime.

Minimum string length: `1`

​

sslCheckDomain

string | null

​

environmentVariables

object[] | null

Key/value pairs for setting environment variables during check execution. These are only relevant for Browser checks. Use global environment variables whenever possible.

Maximum array length: `200`

Show child attributes

​

setupSnippetId

number | null

An ID reference to a snippet to use in the setup phase of an API check.

​

tearDownSnippetId

number | null

An ID reference to a snippet to use in the teardown phase of an API check.

​

localSetupScript

string | null

A valid piece of Node.js code to run in the setup phase.

​

localTearDownScript

string | null

A valid piece of Node.js code to run in the teardown phase.

​

degradedResponseTime

number | null

The response time in milliseconds where a check should be considered degraded.

Required range: `0 ​

maxResponseTime

number | null

The response time in milliseconds where a check should be considered failing.

Required range: `0

#### Response

Successful

​

name

string

required

The name of the check.

​

id

string

​

activated

boolean

default: true

Determines if the check is running or not.

​

muted

boolean

default: false

Determines if any notifications will be send out when a check fails and/or recovers.

​

tags

string[]

Tags for organizing and filtering checks.

​

alertSettings

object | null

Alert settings.

Show child attributes

​

useGlobalAlertSettings

boolean

default: true

When true, the account level alert setting will be used, not the alert setting defined on this check.

​

alertChannelSubscriptions

object[]

Show child attributes

​

triggerIncident

object | null

Determines whether the check or monitor should create and resolve an incident based on its alert configuration. Useful for status page automation.

Show child attributes

​

runParallel

boolean

default: false

When true, the check will run in parallel in all selected locations.

​

description

string | null

A description of the check.

Maximum string length: `500`

​

intent

object | null

Show child attributes

​

aiAutoRepairEnabled

boolean | null

​

checkType

enum<string>

Available options: `HEARTBEAT`

​

heartbeat

object

Show child attributes

​

alertChannels

object | null

Show child attributes

​

created_at

string<date-time>

​

updated_at

string<date-time> | null

Was this page helpful?

[Suggest edits](https://github.com/checkly/docs/edit/main/api-reference/heartbeats/update-a-heartbeat-check.mdx)[Raise issue](https://github.com/checkly/docs/issues/new?title=Issue%20on%20docs&body=Path:%20/api-reference/heartbeats/update-a-heartbeat-check)

[Create a Heartbeat monitor Previous](https://www.checklyhq.com/docs/api-reference/heartbeats/create-a-heartbeat-check)[Get Heartbeat monitor availability Next](https://www.checklyhq.com/docs/api-reference/heartbeats/get-heartbeat-availability)

[x](https://x.com/checklyhq)[github](https://github.com/checkly)[linkedin](https://linkedin.com/company/checkly)

[Powered by This documentation is built and hosted on Mintlify, a developer documentation platform](https://www.mintlify.com/?utm_campaign=poweredBy&utm_medium=referral&utm_source=checkly-422f444a)
