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/Attach a domain to a project

Attach a domain to a project

POSThttps://api.shadw.cloud/v1/projects/{project}/domains

Attach a custom domain to a project. Attaching starts an ownership check: add the returned TXT record (verify.txt_name and verify.txt_value) at your DNS provider and verification completes automatically; domain.verify.status in the Get a domain response becomes verified. Once verified, the full hostname and its www. variant are aliased to the project's current production deployment.

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

projectstringRequired

The project name.

Body parameters

domainstringRequired

The fully-qualified domain to attach.

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

const data = await response.json();
console.log(data);
Response
json
{
  "domain": "acme.com",
  "project": "acme-app",
  "attached": false,
  "status": "pending",
  "verify": {
    "status": "pending",
    "txt_name": "_hive-verify.acme.com",
    "txt_value": "hive-verify=3f9c2db1e77a41b0",
    "project": "acme-app",
    "created_ms": 1781906630000,
    "checked_ms": 0,
    "verified_ms": 0,
    "last_probe": ""
  },
  "instructions": "Add a TXT record named _hive-verify.acme.com with the value hive-verify=3f9c2db1e77a41b0 at your DNS provider, then verification completes automatically (usually within a few minutes)."
}