Skip to content
shadwshadw/Docs
GuidesAPIGetting Started
Dashboard
shadw REST APIOverviewErrors
  • GETList domains
  • POSTAttach a domain to a project
  • GETGet a domain
  • PUTSet nameservers
  • POSTRenew the SSL certificate
APIs & SDKs/shadw REST API/Set nameservers

Set nameservers

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

Set the domain's nameservers (when delegating the whole zone to shadw). Returns the full domain record.

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.

Body parameters

nameserversstring[]Required

Nameservers to delegate the zone to.

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

const data = await response.json();
console.log(data);
Response
json
{
  "domain": "acme.com",
  "tenant": "acme",
  "registrar": "",
  "renewal_price": "",
  "auto_renew": false,
  "cdn_active": true,
  "created_ms": 1781906630000,
  "expires_ms": 0,
  "nameservers": ["ns1.shadw.cloud", "ns2.shadw.cloud"],
  "ssl": { "id": "", "cns": [], "renewal": "pending", "issued_ms": 0, "expires_ms": 0, "provider": "OpenEdge (Let's Encrypt)" },
  "records": [
    { "id": "rec_3f9c2db1e77a41b0", "name": "", "type": "CAA", "value": "0 issue \"letsencrypt.org\"", "ttl": 60, "priority": null, "comment": "Managed SSL issuer", "created_ms": 1781906630000, "system": true }
  ]
}