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. The domain's root label is aliased to the project's current deployment.

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

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": true }