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.
/deployments/{id}/domainsList all custom domains attached to a deployment.
🔒 Auth: Bearer token required
iduuidrequiredDeployment ID[
{
"id": "d1e2f3...",
"domain": "api.example.com",
"verified": true,
"created_at": "2026-02-20T08:00:00Z"
}
]/deployments/{id}/domainsAdd 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
iduuidrequiredDeployment IDdomainstringrequiredThe custom domain (e.g., api.example.com){
"id": "d1e2f3...",
"domain": "api.example.com",
"verified": false,
"cname_target": "runixcloud.dev"
}Add the domain via the API
curl -X POST https://api.runix.dev/deployments/a1b2c3d4-.../domains \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{ "domain": "api.example.com" }'Add a CNAME record in your DNS provider
| Type | Name | Value |
|---|---|---|
| CNAME | api | runixcloud.dev |
Verify the domain
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.
/deployments/{id}/domains/{domain_id}/verifyVerify 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
iduuidrequiredDeployment IDdomain_iduuidrequiredDomain ID{
"id": "d1e2f3...",
"domain": "api.example.com",
"verified": true
}/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
iduuidrequiredDeployment IDdomain_iduuidrequiredDomain ID