Update group
curl --request PATCH \
--url https://api.dnsradar.dev/groups/{group_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "Premium Accounts",
"slug": "premium-accounts",
"webhooks": [
"whk_abc123...",
"whk_def456..."
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Premium Accounts',
slug: 'premium-accounts',
webhooks: ['whk_abc123...', 'whk_def456...']
})
};
fetch('https://api.dnsradar.dev/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dnsradar.dev/groups/{group_id}"
payload = {
"name": "Premium Accounts",
"slug": "premium-accounts",
"webhooks": ["whk_abc123...", "whk_def456..."]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.dnsradar.dev/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dnsradar.dev/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dnsradar.dev/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Premium Accounts',
'slug' => 'premium-accounts',
'webhooks' => [
'whk_abc123...',
'whk_def456...'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.dnsradar.dev/groups/{group_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}")
.asString();{
"id": "grp_abc123...",
"slug": "production-servers",
"name": "Production Servers",
"is_default": true,
"monitors": 42,
"webhooks": [
"whk_abc123...",
"whk_def456..."
]
}{
"code": 400,
"errors": {
"email": "Invalid email format"
}
}{
"code": 401,
"error": "Unauthorized"
}{
"code": 404,
"error": "Not found"
}Groups
Update group
Update a group’s name and/or slug.
PATCH
/
groups
/
{group_id}
Update group
curl --request PATCH \
--url https://api.dnsradar.dev/groups/{group_id} \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"name": "Premium Accounts",
"slug": "premium-accounts",
"webhooks": [
"whk_abc123...",
"whk_def456..."
]
}
'const options = {
method: 'PATCH',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Premium Accounts',
slug: 'premium-accounts',
webhooks: ['whk_abc123...', 'whk_def456...']
})
};
fetch('https://api.dnsradar.dev/groups/{group_id}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.dnsradar.dev/groups/{group_id}"
payload = {
"name": "Premium Accounts",
"slug": "premium-accounts",
"webhooks": ["whk_abc123...", "whk_def456..."]
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)require 'uri'
require 'net/http'
url = URI("https://api.dnsradar.dev/groups/{group_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}"
response = http.request(request)
puts response.read_bodypackage main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.dnsradar.dev/groups/{group_id}"
payload := strings.NewReader("{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.dnsradar.dev/groups/{group_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Premium Accounts',
'slug' => 'premium-accounts',
'webhooks' => [
'whk_abc123...',
'whk_def456...'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}HttpResponse<String> response = Unirest.patch("https://api.dnsradar.dev/groups/{group_id}")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Premium Accounts\",\n \"slug\": \"premium-accounts\",\n \"webhooks\": [\n \"whk_abc123...\",\n \"whk_def456...\"\n ]\n}")
.asString();{
"id": "grp_abc123...",
"slug": "production-servers",
"name": "Production Servers",
"is_default": true,
"monitors": 42,
"webhooks": [
"whk_abc123...",
"whk_def456..."
]
}{
"code": 400,
"errors": {
"email": "Invalid email format"
}
}{
"code": 401,
"error": "Unauthorized"
}{
"code": 404,
"error": "Not found"
}You can update a group’s name and/or slug.
You can pass only the fields you want to update; other fields will remain unchanged.
You can pass only the fields you want to update; other fields will remain unchanged.
Changing the slug will affect how you reference the group in API calls.
Authorizations
API key used to authenticate yourself on DNSRadar. Obtain your API key from your DNSRadar dashboard.
Path Parameters
Group ID (e.g: grp_abc123...)
Body
application/json
Response
Group updated
Group for organizing monitors
Group identifier with 'grp_' prefix
Example:
"grp_abc123..."
URL-friendly identifier
Example:
"production-servers"
Display name
Example:
"Production Servers"
Whether this is the default group
Number of monitors in this group
Example:
42
List of webhook UUIDs associated with this group
Webhook UUID with 'whk_' prefix
Example:
["whk_abc123...", "whk_def456..."]
⌘I

