Skip to main content
PATCH
/
webhooks
/
{webhook_id}
Update webhook
curl --request PATCH \
  --url https://api.dnsradar.dev/webhooks/{webhook_id} \
  --header 'Content-Type: application/json' \
  --header 'X-Api-Key: <api-key>' \
  --data '
{
  "url": "<string>",
  "method": "POST",
  "headers": {},
  "secret": "Ultra Secure P@ssw0rd!",
  "groups": [
    "<string>"
  ]
}
'
{
  "id": "whk_abc123...",
  "created": "2023-11-07T05:31:56Z",
  "url": "https://api.server.com/webhook/dnsradar",
  "method": "POST",
  "headers": {
    "Authorization": "Bearer abc123token",
    "X-Custom-Header": "value"
  },
  "secret": "Ultra Secure P@ssw0rd!",
  "is_active": true,
  "last_error": "Timeout connecting to endpoint",
  "last_executed": "2023-11-07T05:31:56Z"
}
Allows you to change the webhook’s settings to adapt to your needs.
You can update one or more fields of the webhook, and fields not included in the request body will remain unchanged.
Changing the header field will completely replace the existing headers; it will not merge them.

Authorizations

X-Api-Key
string
header
required

API key used to authenticate yourself on DNSRadar. Obtain your API key from your DNSRadar dashboard.

Path Parameters

webhook_id
string
required

Body

application/json
url
string<uri>
Maximum string length: 2000
method
enum<string>
Available options:
POST,
PUT,
DELETE,
PATCH
headers
object
secret
string

Secret key for HMAC-SHA256 signing of webhook requests

Example:

"Ultra Secure P@ssw0rd!"

groups
string[]

Response

Webhook updated

Webhook configuration for event notifications

id
string

Webhook identifier with 'whk_' prefix

Example:

"whk_abc123..."

created
string<date-time>

Webhook creation datetime in ISO 8601 format

url
string<uri>

Webhook endpoint URL

Example:

"https://api.server.com/webhook/dnsradar"

method
enum<string>
default:POST

HTTP method to use for the webhook

Available options:
POST,
PUT,
DELETE,
PATCH
headers
object

Custom HTTP headers as key-value pairs

Example:
{
"Authorization": "Bearer abc123token",
"X-Custom-Header": "value"
}
secret
string | null

Secret key used for HMAC-SHA256 signing of webhook requests. The signature is sent in the X-Webhook-Signature header.

Example:

"Ultra Secure P@ssw0rd!"

is_active
boolean

Whether webhook is active

last_error
string | null

Last error message if any

Example:

"Timeout connecting to endpoint"

last_executed
string<date-time> | null

Datetime of last execution in ISO 8601 format