Update Multiple Monitors at Once
Instead of updating monitors individually, you can modify all monitors in a group simultaneously. This is useful for managing monitoring behavior across related DNS records or customer domains.
Bulk Update Endpoint
Use the PATCH /groups/{slug}/monitors endpoint to update all monitors in a group:
curl -X PATCH https://api.dnsradar.dev/groups/production-servers/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"frequency": 15
}'const response = await fetch('https://api.dnsradar.dev/groups/production-servers/monitors', {
method: 'PATCH',
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"frequency": 15
})
});
const data = await response.json();import requests
response = requests.patch(
'https://api.dnsradar.dev/groups/production-servers/monitors',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
"frequency": 15
}
)require 'net/http'
require 'json'
uri = URI('https://api.dnsradar.dev/groups/production-servers/monitors')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['X-API-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = {
"frequency": 15
}.to_json
response = http.request(request)package main
import (
"bytes"
"encoding/json"
"net/http"
)
data := {
"frequency": 15
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("PATCH", "https://api.dnsradar.dev/groups/production-servers/monitors", bytes.NewBuffer(jsonData))
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
response, _ := client.Do(req)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.dnsradar.dev/groups/production-servers/monitors');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = json_encode({
"frequency": 15
});
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """{
"frequency": 15
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dnsradar.dev/groups/production-servers/monitors"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());using System.Net.Http;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var data = new
{
"frequency": 15
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PatchAsync(
"https://api.dnsradar.dev/groups/production-servers/monitors",
content
);This updates the check frequency for ALL monitors in the production-servers group to 15 minutes.
Updatable Properties
You can bulk update these monitor properties:
Check Frequency
Change how often monitors are checked (in minutes):
curl -X PATCH https://api.dnsradar.dev/groups/critical-infrastructure/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"frequency": 5
}'const response = await fetch('https://api.dnsradar.dev/groups/critical-infrastructure/monitors', {
method: 'PATCH',
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"frequency": 5
})
});
const data = await response.json();import requests
response = requests.patch(
'https://api.dnsradar.dev/groups/critical-infrastructure/monitors',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
"frequency": 5
}
)require 'net/http'
require 'json'
uri = URI('https://api.dnsradar.dev/groups/critical-infrastructure/monitors')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['X-API-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = {
"frequency": 5
}.to_json
response = http.request(request)package main
import (
"bytes"
"encoding/json"
"net/http"
)
data := {
"frequency": 5
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("PATCH", "https://api.dnsradar.dev/groups/critical-infrastructure/monitors", bytes.NewBuffer(jsonData))
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
response, _ := client.Do(req)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.dnsradar.dev/groups/critical-infrastructure/monitors');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = json_encode({
"frequency": 5
});
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """{
"frequency": 5
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dnsradar.dev/groups/critical-infrastructure/monitors"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());using System.Net.Http;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var data = new
{
"frequency": 5
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PatchAsync(
"https://api.dnsradar.dev/groups/critical-infrastructure/monitors",
content
);Available frequencies: 5, 10, 15, 30, 60, 120 (minutes)
Plan Limits: Free plan limited to 60-minute frequency.
Premium plans support down to 5-minute intervals.
Active Status
Enable or disable all monitors in a group:
curl -X PATCH https://api.dnsradar.dev/groups/customer-123/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"is_active": false
}'const response = await fetch('https://api.dnsradar.dev/groups/customer-123/monitors', {
method: 'PATCH',
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"is_active": false
})
});
const data = await response.json();import requests
response = requests.patch(
'https://api.dnsradar.dev/groups/customer-123/monitors',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
"is_active": false
}
)require 'net/http'
require 'json'
uri = URI('https://api.dnsradar.dev/groups/customer-123/monitors')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['X-API-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = {
"is_active": false
}.to_json
response = http.request(request)package main
import (
"bytes"
"encoding/json"
"net/http"
)
data := {
"is_active": false
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("PATCH", "https://api.dnsradar.dev/groups/customer-123/monitors", bytes.NewBuffer(jsonData))
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
response, _ := client.Do(req)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.dnsradar.dev/groups/customer-123/monitors');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = json_encode({
"is_active": false
});
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """{
"is_active": false
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dnsradar.dev/groups/customer-123/monitors"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());using System.Net.Http;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var data = new
{
"is_active": false
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PatchAsync(
"https://api.dnsradar.dev/groups/customer-123/monitors",
content
);Use cases for disabling monitors:
- Temporary maintenance windows
- Customer account suspension
- Testing or debugging
- Service migration
Update Multiple Properties
Combine frequency and status changes:
curl -X PATCH https://api.dnsradar.dev/groups/maintenance-mode/monitors \
-H "X-API-Key: YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"frequency": 120,
"is_active": false
}'const response = await fetch('https://api.dnsradar.dev/groups/maintenance-mode/monitors', {
method: 'PATCH',
headers: {
"X-API-Key": "YOUR_API_KEY",
"Content-Type": "application/json"
},
body: JSON.stringify({
"frequency": 120,
"is_active": false
})
});
const data = await response.json();import requests
response = requests.patch(
'https://api.dnsradar.dev/groups/maintenance-mode/monitors',
headers={
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'application/json'
},
json={
"frequency": 120,
"is_active": false
}
)require 'net/http'
require 'json'
uri = URI('https://api.dnsradar.dev/groups/maintenance-mode/monitors')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['X-API-Key'] = 'YOUR_API_KEY'
request['Content-Type'] = 'application/json'
request.body = {
"frequency": 120,
"is_active": false
}.to_json
response = http.request(request)package main
import (
"bytes"
"encoding/json"
"net/http"
)
data := {
"frequency": 120,
"is_active": false
}
jsonData, _ := json.Marshal(data)
req, _ := http.NewRequest("PATCH", "https://api.dnsradar.dev/groups/maintenance-mode/monitors", bytes.NewBuffer(jsonData))
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
client := &http.Client{}
response, _ := client.Do(req)<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.dnsradar.dev/groups/maintenance-mode/monitors');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
$headers = [
'X-API-Key: YOUR_API_KEY',
'Content-Type: application/json'
];
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = json_encode({
"frequency": 120,
"is_active": false
});
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$response = curl_exec($ch);
curl_close($ch);import java.net.http.*;
import java.net.URI;
HttpClient client = HttpClient.newHttpClient();
String json = """{
"frequency": 120,
"is_active": false
}""";
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.dnsradar.dev/groups/maintenance-mode/monitors"))
.header("X-API-Key", "YOUR_API_KEY")
.header("Content-Type", "application/json")
.method("PATCH", HttpRequest.BodyPublishers.ofString(json))
.build();
HttpResponse<String> response = client.send(request,
HttpResponse.BodyHandlers.ofString());using System.Net.Http;
using System.Text;
using System.Text.Json;
var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-Key", "YOUR_API_KEY");
var data = new
{
"frequency": 120,
"is_active": false
};
var json = JsonSerializer.Serialize(data);
var content = new StringContent(json, Encoding.UTF8, "application/json");
var response = await client.PatchAsync(
"https://api.dnsradar.dev/groups/maintenance-mode/monitors",
content
);API Response
The API returns HTTP 204 No Content on success, indicating all monitors were updated without returning data.
HTTP/1.1 204 No Content