Create monitor
curl --request POST \
--url https://app.larm.dev/api/v1/monitors \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"check_type": "<string>",
"config": {},
"interval_seconds": 123,
"timeout_ms": 123,
"confirm_down_minutes": 123,
"confirm_up_minutes": 123,
"confirm_down_after": 123,
"confirm_up_after": 123,
"enabled": true,
"alert_channel_ids": [
"<string>"
]
}
'import requests
url = "https://app.larm.dev/api/v1/monitors"
payload = {
"name": "<string>",
"check_type": "<string>",
"config": {},
"interval_seconds": 123,
"timeout_ms": 123,
"confirm_down_minutes": 123,
"confirm_up_minutes": 123,
"confirm_down_after": 123,
"confirm_up_after": 123,
"enabled": True,
"alert_channel_ids": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
check_type: '<string>',
config: {},
interval_seconds: 123,
timeout_ms: 123,
confirm_down_minutes: 123,
confirm_up_minutes: 123,
confirm_down_after: 123,
confirm_up_after: 123,
enabled: true,
alert_channel_ids: ['<string>']
})
};
fetch('https://app.larm.dev/api/v1/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.larm.dev/api/v1/monitors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'check_type' => '<string>',
'config' => [
],
'interval_seconds' => 123,
'timeout_ms' => 123,
'confirm_down_minutes' => 123,
'confirm_up_minutes' => 123,
'confirm_down_after' => 123,
'confirm_up_after' => 123,
'enabled' => true,
'alert_channel_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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://app.larm.dev/api/v1/monitors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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<String> response = Unirest.post("https://app.larm.dev/api/v1/monitors")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.larm.dev/api/v1/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing site",
"check_type": "http",
"enabled": true,
"interval_seconds": 180,
"timeout_ms": 10000,
"confirm_down_minutes": 1,
"confirm_up_minutes": 3,
"config": {
"url": "https://example.com",
"method": "GET",
"expected_status_codes": [200],
"follow_redirects": true
},
"current_state": "pending",
"alert_channel_ids": ["660e8400-e29b-41d4-a716-446655440000"],
"inserted_at": "2025-03-01T12:00:00Z",
"updated_at": "2025-03-01T12:00:00Z"
}
}
Monitors
Create monitor
Creates a new monitor
POST
/
api
/
v1
/
monitors
Create monitor
curl --request POST \
--url https://app.larm.dev/api/v1/monitors \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"check_type": "<string>",
"config": {},
"interval_seconds": 123,
"timeout_ms": 123,
"confirm_down_minutes": 123,
"confirm_up_minutes": 123,
"confirm_down_after": 123,
"confirm_up_after": 123,
"enabled": true,
"alert_channel_ids": [
"<string>"
]
}
'import requests
url = "https://app.larm.dev/api/v1/monitors"
payload = {
"name": "<string>",
"check_type": "<string>",
"config": {},
"interval_seconds": 123,
"timeout_ms": 123,
"confirm_down_minutes": 123,
"confirm_up_minutes": 123,
"confirm_down_after": 123,
"confirm_up_after": 123,
"enabled": True,
"alert_channel_ids": ["<string>"]
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
check_type: '<string>',
config: {},
interval_seconds: 123,
timeout_ms: 123,
confirm_down_minutes: 123,
confirm_up_minutes: 123,
confirm_down_after: 123,
confirm_up_after: 123,
enabled: true,
alert_channel_ids: ['<string>']
})
};
fetch('https://app.larm.dev/api/v1/monitors', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.larm.dev/api/v1/monitors",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'check_type' => '<string>',
'config' => [
],
'interval_seconds' => 123,
'timeout_ms' => 123,
'confirm_down_minutes' => 123,
'confirm_up_minutes' => 123,
'confirm_down_after' => 123,
'confirm_up_after' => 123,
'enabled' => true,
'alert_channel_ids' => [
'<string>'
]
]),
CURLOPT_HTTPHEADER => [
"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://app.larm.dev/api/v1/monitors"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
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<String> response = Unirest.post("https://app.larm.dev/api/v1/monitors")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.larm.dev/api/v1/monitors")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"check_type\": \"<string>\",\n \"config\": {},\n \"interval_seconds\": 123,\n \"timeout_ms\": 123,\n \"confirm_down_minutes\": 123,\n \"confirm_up_minutes\": 123,\n \"confirm_down_after\": 123,\n \"confirm_up_after\": 123,\n \"enabled\": true,\n \"alert_channel_ids\": [\n \"<string>\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing site",
"check_type": "http",
"enabled": true,
"interval_seconds": 180,
"timeout_ms": 10000,
"confirm_down_minutes": 1,
"confirm_up_minutes": 3,
"config": {
"url": "https://example.com",
"method": "GET",
"expected_status_codes": [200],
"follow_redirects": true
},
"current_state": "pending",
"alert_channel_ids": ["660e8400-e29b-41d4-a716-446655440000"],
"inserted_at": "2025-03-01T12:00:00Z",
"updated_at": "2025-03-01T12:00:00Z"
}
}
Requires
monitors:read_write permission.
Monitor name (1–255 characters)
http, tcp, dns, heartbeat, or syntheticCheck interval in seconds (minimum: 30)
Timeout in milliseconds (range: 1000–60000)
Minutes of consecutive failures before marking down (HTTP, TCP, DNS, heartbeat)
Minutes of consecutive successes before marking recovered (HTTP, TCP, DNS, heartbeat)
Consecutive failures before marking down (synthetic monitors only, range: 1–10)
Consecutive passes before marking recovered (synthetic monitors only, range: 1–10)
Whether the monitor is active
List of alert channel IDs to attach. If omitted, channels with
default_for_new_monitors are linked automatically.{
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Marketing site",
"check_type": "http",
"enabled": true,
"interval_seconds": 180,
"timeout_ms": 10000,
"confirm_down_minutes": 1,
"confirm_up_minutes": 3,
"config": {
"url": "https://example.com",
"method": "GET",
"expected_status_codes": [200],
"follow_redirects": true
},
"current_state": "pending",
"alert_channel_ids": ["660e8400-e29b-41d4-a716-446655440000"],
"inserted_at": "2025-03-01T12:00:00Z",
"updated_at": "2025-03-01T12:00:00Z"
}
}
⌘I