Skip to main content

Overview

DNSRadar sends webhook events to notify your application in real-time when DNS monitoring events occur. When a monitor detects a change in DNS records, we’ll send an HTTP POST request to your configured webhook endpoint with details about the event.
Webhooks enable you to build automated workflows and integrations that respond immediately to DNS changes without polling the API.

Event Payload Structure

When an event occurs, we send a POST request to your webhook URL with the following JSON payload:

Payload Fields

string
required
Unique identifier for this webhook request
string
required
Unique identifier of the webhook configuration
object
required
The monitoring event that triggered the webhook
string
required
Unique identifier for the event
string
required
Unique identifier of the monitor that detected the change
string
required
ISO 8601 timestamp when the event occurred
array
The DNS record values before this event (if available)
array
The current DNS record values (if available)
string
required
The previous state of the monitor (VALID, MISMATCH, ERROR)
string
required
The current state of the monitor (VALID, MISMATCH, ERROR)
integer
required
Number of consecutive times the monitor has been in this state
object
required
Domain configuration object for the monitor
string
required
The root domain being monitored
string
The subdomain being monitored (if applicable)
string
required
The DNS record type (A, AAAA, CNAME, MX, TXT, etc.)
array
required
The expected DNS record values for the monitor
boolean
required
Whether the monitor requires an exact match of DNS values
string
required
ISO 8601 timestamp when the webhook request was created

Retry Logic

DNSRadar implements an automatic retry mechanism to ensure reliable delivery of webhook events. If your endpoint returns a non-2xx status code, we’ll retry the request using an incremental backoff strategy.

Retry Schedule

After the 9th retry fails, we’ll stop attempting to deliver the event and notify you. All events for this webhook will be paused until a successful request is made.

Webhook Pausing

If a webhook consistently fails, all events attached to that webhook will be automatically paused to prevent further failed attempts. The webhook will resume automatically once a request succeeds.
Monitor your webhook health in the DNSRadar Dashboard to identify and resolve issues before events are paused.

Security

Webhook Signatures

Every webhook request includes cryptographic signatures to verify authenticity and prevent unauthorized requests.

Signature Headers

string
required
HMAC-SHA256 signature of the raw request body, signed with your webhook secret
integer
required
Unix timestamp (in seconds) when the webhook was sent

Verifying Signatures

To ensure the webhook request is legitimate and hasn’t been tampered with, verify the signature on every request:
Always verify the timestamp to prevent replay attacks. We recommend rejecting webhooks with timestamps older than 5 minutes.

Best Practices

Your webhook endpoint should respond with a 2xx status code within 30 seconds. Process events asynchronously if needed.
Due to retries, you may receive the same event multiple times. Use the id field to deduplicate events.
Always use HTTPS URLs for your webhook endpoints to ensure data is encrypted in transit.
Track failed webhook attempts in the DNSRadar Dashboard and set up alerts for repeated failures.
Handle errors gracefully and log failures for debugging.
Use the webhook test endpoint to verify your integration before going live.

Example: Complete Webhook Handler

Here’s a complete example of a webhook handler with all best practices:
Need help implementing webhooks? Check out our API Reference or contact support.