Skip to main content

Overview

The DNSRadar API uses conventional HTTP response codes to indicate the success or failure of an API request. Codes in the 2xx range indicate success, codes in the 4xx range indicate an error caused by the provided information, and codes in the 5xx range indicate an error with DNSRadar’s servers.

Error Response Format

When an error occurs, the API returns a JSON response with the following structure:
integer
HTTP status code indicating the error type
string
Human-readable error message describing what went wrong
object
Field-specific validation errors (present for 400 Bad Request responses)

HTTP Status Codes

Success Codes

Client Error Codes

Your request is invalid or malformed. This typically means:
  • A required parameter is missing
  • A parameter has an invalid value
  • The request body is not valid JSON
  • Validation constraints are not met
Example:
How to fix: Check the errors object in the response for specific field-level validation errors.
No API key was provided in the request header.Example:
How to fix: Include your API key in the X-Api-Key header. See Authentication for details.
Your request requires a premium subscription or you’ve reached your plan limits.Example:
How to fix: Upgrade your plan in the Dashboard or remove existing monitors.
The API key provided is invalid, expired, or has been revoked.Example:
How to fix: Verify your API key is correct or generate a new one from the Dashboard.
The requested resource does not exist or you don’t have access to it.Example:
How to fix: Check that the resource UUID is correct and belongs to your organization.
The HTTP method used is not supported for this endpoint.Example:
How to fix: Use the correct HTTP method (GET, POST, PATCH, DELETE) as specified in the API documentation.
You’ve exceeded the rate limit for API requests.Example:
How to fix: Wait for the rate limit to reset (check X-RateLimit-Reset header) or implement exponential backoff. See Rate Limiting for details.

Server Error Codes

An unexpected error occurred on DNSRadar’s servers.Example:
How to fix: This is a server-side issue. Retry your request after a brief wait. If the problem persists, contact support@dnsradar.dev.
The API is temporarily unavailable, typically due to maintenance.How to fix: Wait a few minutes and retry your request. Check our status page for updates.

Handling Errors

Here’s how to properly handle errors in your code:
If you encounter an error not listed here or need assistance, contact us at support@dnsradar.dev with the request ID from the response headers.