Skip to main content

Overview

The DNSRadar API is fully documented using the OpenAPI 3.0 specification (formerly known as Swagger). This machine-readable format allows you to automatically generate client libraries, test your API integration, and import the API into various development tools.

Download the Specification

You can access our complete OpenAPI specification file here:

OpenAPI Specification

Download the latest OpenAPI 3.0 JSON specification
Our OpenAPI specification is automatically updated whenever we release new API features or changes. You can always access the latest version at the URL above.

What’s Included

The OpenAPI specification contains complete details about:
All available API endpoints with their paths, HTTP methods, and descriptions
Query parameters, path parameters, headers, and request body schemas
Detailed response structures for success and error cases
Security schemes and authentication requirements
Complete schema definitions for all data types (Monitors, Events, Webhooks, etc.)
Request and response examples for each endpoint

Using the Specification

Generate Client Libraries

Use the OpenAPI specification to automatically generate client libraries in your preferred programming language:
# Install OpenAPI Generator
npm install @openapitools/openapi-generator-cli -g

# Generate a Python client
openapi-generator-cli generate \
  -i https://api.dnsradar.dev/openapi.json \
  -g python \
  -o ./dnsradar-python-client

# Generate a JavaScript/TypeScript client
openapi-generator-cli generate \
  -i https://api.dnsradar.dev/openapi.json \
  -g typescript-fetch \
  -o ./dnsradar-ts-client

Import into Development Tools

The OpenAPI specification can be imported into popular API development tools:

Postman

Import the spec into Postman to get a complete collection of all API endpoints

Insomnia

Load the OpenAPI file directly into Insomnia for API testing

Swagger UI

Use Swagger UI to create an interactive API documentation interface

VS Code

Use OpenAPI extensions in VS Code for autocomplete and validation

Example: Using with Postman

  1. Open Postman and click Import
  2. Select Link and paste: https://api.dnsradar.dev/openapi.json
  3. Click Import to create a complete collection
  4. Add your API key to the collection variables
  5. Start making requests

Example: Self-Hosting API Documentation

You can host your own version of the API documentation using the OpenAPI specification:
<!DOCTYPE html>
<html>
<head>
  <title>DNSRadar API Documentation</title>
  <link rel="stylesheet" type="text/css" href="https://unpkg.com/swagger-ui-dist/swagger-ui.css">
</head>
<body>
  <div id="swagger-ui"></div>
  <script src="https://unpkg.com/swagger-ui-dist/swagger-ui-bundle.js"></script>
  <script>
    SwaggerUIBundle({
      url: "https://api.dnsradar.dev/openapi.json",
      dom_id: '#swagger-ui',
    });
  </script>
</body>
</html>

Validation and Testing

Use the OpenAPI specification to validate your API requests and responses:
import { OpenAPIValidator } from 'express-openapi-validator';

// Validate requests against the OpenAPI spec
app.use(
  OpenAPIValidator.middleware({
    apiSpec: 'https://api.dnsradar.dev/openapi.json',
    validateRequests: true,
    validateResponses: true,
  })
);

Version History

Our API follows semantic versioning. The current version is documented in the OpenAPI specification’s info.version field:
{
  "openapi": "3.0.3",
  "info": {
    "title": "DNSRadar API",
    "version": "1.0.0",
    "description": "Monitor your DNS records and get notified when they change"
  }
}
Subscribe to our changelog or follow us on X (Twitter) and Bluesky to get notified about API updates and new features.

Support

If you find any issues with the OpenAPI specification or have suggestions for improvement, please contact us at support@dnsradar.dev.