Skip to content
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/Update a DNS record

Update a DNS record

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

Edit an existing DNS record (system-managed records are immutable).

Authentication

AuthorizationbearerToken

A platform API key (hive_…, created under Settings → API Keys) or a JWT of at most 1 hour from POST /v1/token, which is server-only once HIVE_JWT_SECRET is set. An API key scopes the request to the team it was created under.

Path parameters

domainstringRequired

The domain name.

idstringRequired

The record id.

Body parameters

typestringRequired

Record type.

namestringRequired

Subdomain, or an empty string for the apex.

valuestringRequired

Record value.

ttlnumberOptional

Time-to-live in seconds.

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

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