Documentation

api

Domains API

Add, verify, and remove custom domains for your deployments.

Custom Domains#

Every deployment gets a free subdomain at runixcloud.dev. On paid plans, you can add your own custom domains. Runix handles TLS certificates automatically.

Custom domains require the Starter plan or above. Hobby plan deployments can only use the default runixcloud.dev subdomain.


GET/deployments/{id}/domains

List all custom domains attached to a deployment.

🔒 Auth: Bearer token required

Parameters
iduuidrequiredDeployment ID
Response
[
  {
    "id": "d1e2f3...",
    "domain": "api.example.com",
    "verified": true,
    "created_at": "2026-02-20T08:00:00Z"
  }
]

POST/deployments/{id}/domains

Add a custom domain to a deployment. After adding, you need to configure a CNAME record pointing to runixcloud.dev, then verify the domain.

🔒 Auth: Bearer token required

Parameters
iduuidrequiredDeployment ID
domainstringrequiredThe custom domain (e.g., api.example.com)
Response
{
  "id": "d1e2f3...",
  "domain": "api.example.com",
  "verified": false,
  "cname_target": "runixcloud.dev"
}
1

Add the domain via the API

bash
curl -X POST https://api.runix.dev/deployments/a1b2c3d4-.../domains \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{ "domain": "api.example.com" }'
2

Add a CNAME record in your DNS provider

TypeNameValue
CNAMEapirunixcloud.dev
3

Verify the domain

bash
curl -X POST https://api.runix.dev/deployments/a1b2c3d4-.../domains/d1e2f3.../verify \
  -H "Authorization: Bearer $TOKEN"

DNS changes can take up to 48 hours to propagate. If verification fails, wait a bit and try again.


POST/deployments/{id}/domains/{domain_id}/verify

Verify that a custom domain's CNAME record is correctly configured. Once verified, Runix provisions a TLS certificate and starts routing traffic.

🔒 Auth: Bearer token required

Parameters
iduuidrequiredDeployment ID
domain_iduuidrequiredDomain ID
Response
{
  "id": "d1e2f3...",
  "domain": "api.example.com",
  "verified": true
}

DELETE/deployments/{id}/domains/{domain_id}

Remove a custom domain from a deployment. Traffic to that domain will stop being routed to your service.

🔒 Auth: Bearer token required

Parameters
iduuidrequiredDeployment ID
domain_iduuidrequiredDomain ID