Attach a custom domain to an app
POST/apps/{name}/domains
Attaches a custom domain (FQDN, globally unique — one domain to one app). A request whose Host is the domain then routes to this app, and in terminate mode the proxy obtains a cert for it.
path parameters
object
namestringrequiredApp name (a DNS label, e.g. web).
Request bodyapplication/json
AddDomainReq
domainstringResponses
200 OKOK
AppResponse
can_callarray
items
string
created_atstringdate-timedesired_statestringdisk_bytesintegerint64domainsarray
items
string
envobject
additional properties
string
generationintegerhealthHealthCheck
cmdarray
items
string
healthy_thresholdintegerinterval_sintegerpathstringportintegerstart_period_sintegertimeout_sintegertypestringunhealthy_thresholdintegerhttp_redirectboolean | nullidstringimageImageRef
ocistringpathstringmemory_mibintegernamestringnetworkNetworkRequest
allowlistarray
items
string
allowlist_cidrarray
items
string
enabledbooleanfull_egressbooleanportintegerpublisharray
items
PortMapping
guest_portintegerhost_ipstringhost_portintegerprotocolstringpublish_allbooleanpullstringrestartWireRestartPolicy
max_retriesintegerpolicystringserviceWireServiceSpec
cmdarray | null
items
string
cwdstringenvobject
additional properties
string
env_exactbooleanlog_buffer_bytesintegerrestartWireRestartPolicy
max_retriesintegerpolicystringstop_grace_sintegerstop_signalstringuserstringsleepSleepPolicy
conn_idle_timeout_sintegeridle_timeout_sintegerkeep_connectionsbooleanmax_scaleintegermin_scaleintegertarget_concurrencyintegerstatusAppStatus
healthstringinstance_generationintegerinstance_idstringinstancesarray
items
InstanceStatus
generationintegerhealthstringinstance_idstringlast_errorstringlast_wake_latency_msintegerint64phasestringready_replicasintegerreplicasintegerrestartsintegersleep_countintegertls_modestringupdated_atstringdate-timevcpusintegervolumesarray
items
VolumeMount
namestringpathstring400 Bad requestBad Request
ErrorResponse
codestringerrorstring404 Not foundNot Found
ErrorResponse
codestringerrorstring409 ConflictConflict
ErrorResponse
codestringerrorstring501 Not Implemented
ErrorResponse
codestringerrorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍POST/apps/{name}/domains
curl '/apps/{name}/domains' \
-X POST \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch("/apps/{name}/domains", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: "{}",
});
const data = await response.json();import requests
response = requests.post(
"/apps/{name}/domains",
headers={
"Content-Type": "application/json",
},
data="{}",
)
data = response.json()Response
200 OK
{
"can_call": [
"string"
],
"created_at": "2026-01-02T15:04:05Z",
"desired_state": "string",
"disk_bytes": 0,
"domains": [
"string"
],
"env": {},
"generation": 0,
"health": {
"cmd": [
"string"
],
"healthy_threshold": 0,
"interval_s": 0,
"path": "string",
"port": 0,
"start_period_s": 0,
"timeout_s": 0,
"type": "string",
"unhealthy_threshold": 0
},
"http_redirect": false,
"id": "string",
"image": {
"oci": "string",
"path": "string"
},
"memory_mib": 0,
"name": "string",
"network": {
"allowlist": [
"string"
],
"allowlist_cidr": [
"string"
],
"enabled": false,
"full_egress": false
},
"port": 0,
"publish": [
{
"guest_port": 0,
"host_ip": "string",
"host_port": 0,
"protocol": "string"
}
],
"publish_all": false,
"pull": "string",
"restart": {
"max_retries": 0,
"policy": "string"
},
"service": {
"cmd": [
"string"
],
"cwd": "string",
"env": {},
"env_exact": false,
"log_buffer_bytes": 0,
"restart": {
"max_retries": 0,
"policy": "string"
},
"stop_grace_s": 0,
"stop_signal": "string",
"user": "string"
},
"sleep": {
"conn_idle_timeout_s": 0,
"idle_timeout_s": 0,
"keep_connections": false,
"max_scale": 0,
"min_scale": 0,
"target_concurrency": 0
},
"status": {
"health": "string",
"instance_generation": 0,
"instance_id": "string",
"instances": [
{
"generation": 0,
"health": "string",
"instance_id": "string"
}
],
"last_error": "string",
"last_wake_latency_ms": 0,
"phase": "string",
"ready_replicas": 0,
"replicas": 0,
"restarts": 0,
"sleep_count": 0
},
"tls_mode": "string",
"updated_at": "2026-01-02T15:04:05Z",
"vcpus": 0,
"volumes": [
{
"name": "string",
"path": "string"
}
]
}