shadwshadw/Docs
GuidesAPIGetting Started
Dashboard
shadw REST APIOverviewErrors
  • POSTCreate a DNS record
  • PUTUpdate a DNS record
  • DELDelete a DNS record
  • POSTImport DNS records
  • GETScan existing DNS
APIs & SDKs/shadw REST API/Create a DNS record

Create a DNS record

POSThttps://api.shadw.cloud/v1/domains/{domain}/records

Create a DNS record. shadw's authoritative DNS server answers queries for the domain from these records.

Authentication

AuthorizationbearerToken

A platform API key (hive_…, created under Settings → API Keys) or a short-lived JWT minted with POST /v1/token. An API key scopes the request to the team it was created under.

Path parameters

domainstringRequired

The domain name.

Body parameters

type"A" | "AAAA" | "CNAME" | "TXT" | "MX" | "NS"Required

Record type.

namestringRequired

Subdomain (e.g. "www") or "@" for the apex.

valuestringRequired

Record value (IP, hostname, text…).

ttlnumberOptional

Time-to-live in seconds (default 3600).

prioritynumberOptional

Priority (MX records).

ts
const response = await fetch('https://api.shadw.cloud/v1/domains/{domain}/records', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY', // hive_… (Settings → API Keys)
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "type": "A",
    "name": "name",
    "value": "value",
    "ttl": 3600,
    "priority": 3600
  }),
});

const data = await response.json();
console.log(data);
Response
json
{ "id": "rec_a1", "type": "A", "name": "@", "value": "76.76.21.21", "ttl": 3600 }