ðŸ“Ķ
Official OnlyDNS SDKs Are Now Live

We are excited to release official, production-ready client SDKs for Python, TypeScript / Node.js, Go, and PHP. Build, automate, and orchestrate authoritative Anycast DNS with type safety, atomic record helpers, zero bloated dependencies, and native AI agent tooling.

Managing authoritative DNS programmatically should be straightforward, safe, and lightning fast. Today, we are proud to announce the launch of official OnlyDNS Client SDKs across four major programming languages: Python, TypeScript / JavaScript, Go, and PHP.

Whether you are integrating automated DNS provisioning into CI/CD pipelines, orchestrating dynamic microservice endpoints, automating SSL challenge validation, or building autonomous AI agents using Model Context Protocol (MCP), our SDKs eliminate boilerplate HTTP handling and provide robust, type-safe abstractions for every operation.


Why Dedicated DNS SDKs Matter

Interacting with REST APIs via raw HTTP requests or custom cURL scripts often introduces subtle bugs and operational friction:

⚠ïļ Race Conditions & Overwrites

Adding or modifying records across distributed systems without transactional awareness can lead to accidental record overwrites or lost records.

🔒 Token & Authentication Handling

Hardcoding API tokens or writing repetitive bearer token logic across microservices increases security exposure and maintenance overhead.

ðŸ§Đ Inconsistent Error Structures

Parsing JSON error responses manually makes error handling brittle and complicates automated recovery workflows in production.

The OnlyDNS SDKs solve these challenges at the foundation by providing consistent, battle-tested abstractions with zero external bloat.


Core Features & Architecture

⚡

High-Level Atomic Record Helpers

Methods like addRecord(), removeRecord(), updateRecord(), and findRecords() automatically handle existing record fetching, deduplication, and atomic zone persistence.

🌐

100% System API Coverage

Full support for domain lifecycle (/dns), full zone record arrays (/dns/{domain}/records), automated DNSSEC (/dns/{domain}/dnssec), and cryptographic TSIG keys (/dns/tsig).

ðŸŠķ

Zero Heavy Dependencies

Engineered with zero heavy runtime dependencies, utilizing standard libraries, native fetch, or native cURL bindings for near-zero startup overhead and minimal package footprint.

ðŸĪ–

Optimized for AI Agents & MCP

Clear type definitions, deterministic structured outputs, and typed error classes make these SDKs ideal for LLM function calling, LangChain tools, CrewAI agents, and Model Context Protocol servers.


Installation & Code Examples

🐍 Python SDK PyPI

pip install onlydns-sdk

Automatic token detection from ONLYDNS_API_KEY or ~/.config/onlydns/config.json:

from onlydns import OnlyDNSClient

# Initialize client (picks up ONLYDNS_API_KEY from environment)
client = OnlyDNSClient()

# Add an A record with atomic safety
client.add_record(
    domain="example.com",
    name="api",
    record_type="A",
    value="192.0.2.1",
    ttl=300
)

# Enable 1-Click Automated DNSSEC
client.enable_dnssec("example.com")
print("DNSSEC enabled and zone signed!")

⚡ TypeScript / Node.js SDK npm

npm install @onlydns/sdk

Full TypeScript types and native async/await promise support:

import { OnlyDNSClient } from '@onlydns/sdk';

const client = new OnlyDNSClient({
  apiKey: process.env.ONLYDNS_API_KEY
});

// Query records with pattern filtering
const aRecords = await client.findRecords('example.com', {
  name: 'api',
  type: 'A'
});

// Atomic batch updates
await client.addRecord('example.com', {
  name: 'staging',
  type: 'CNAME',
  records: ['edge.example.com'],
  ttl: 300
});

ðŸđ Go SDK Go Modules

go get github.com/onlydns/onlydns-sdk-go
package main

import (
    "context"
    "fmt"
    "github.com/onlydns/onlydns-sdk-go"
)

func main() {
    client, _ := onlydns.NewClient(onlydns.WithEnvAuth())
    
    // Add DNS record
    record, err := client.AddRecord(context.Background(), "example.com", onlydns.RecordInput{
        Name:    "app",
        Type:    "A",
        Records: []string{"192.0.2.50"},
        TTL:     300,
    })
    if err != nil {
        panic(err)
    }
    fmt.Println("Record created:", record.Name)
}

🐘 PHP SDK Composer

composer require onlydns/onlydns-sdk
use OnlyDNS\OnlyDNSClient;

$client = new OnlyDNSClient();

// Add or update records
$client->addRecord('example.com', [
    'name' => 'webhook',
    'type' => 'A',
    'records' => ['192.0.2.75'],
    'ttl' => 300,
]);

// Inspect DNSSEC signing status
$dnssec = $client->getDnssecStatus('example.com');
echo "DNSSEC Enabled: " . ($dnssec->enabled ? 'Yes' : 'No');

Part of the Modern OnlyDNS Tooling Ecosystem

Our SDKs are part of a broader suite of developer-first tooling designed to make DNS management frictionless:

🏷ïļ Article Topics & Tags:
⚡

About OnlyDNS Engineering

OnlyDNS is operated by Quantum Names, leveraging over 26 years of continuous DNS and authoritative name service infrastructure expertise. Our globally distributed Anycast network is engineered specifically for modern developer workloads, AI agents, and resilient enterprise applications.

← Back to All Blog Posts Create Free OnlyDNS Account →

Message Sent

Thanks for contacting OnlyDNS. We received your message and will follow up shortly.