Create a durable app
POST/apps
Creates a named app the daemon keeps a healthy instance of, re-creating it from spec after a daemon restart. desired_state defaults to "running". The instance boots asynchronously; the response is the app's initial state.
Request bodyapplication/json
CreateAppRequest
desired_statestringdisk_bytesintegerint64envobject
additional properties
string
healthHealthCheck
cmdarray
items
string
healthy_thresholdintegerinterval_sintegerpathstringportintegerstart_period_sintegertimeout_sintegertypestringunhealthy_thresholdintegerimageImageRef
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_signalstringuserstringvcpusintegerResponses
201 CreatedCreated
AppResponse
created_atstringdate-timedesired_statestringdisk_bytesintegerint64envobject
additional properties
string
generationintegerhealthHealthCheck
cmdarray
items
string
healthy_thresholdintegerinterval_sintegerpathstringportintegerstart_period_sintegertimeout_sintegertypestringunhealthy_thresholdintegeridstringimageImageRef
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_signalstringuserstringstatusAppStatus
healthstringinstance_idstringlast_errorstringphasestringrestartsintegerupdated_atstringdate-timevcpusinteger400 Bad requestBad Request
ErrorResponse
errorstring403 ForbiddenForbidden
ErrorResponse
errorstring409 ConflictConflict
ErrorResponse
errorstring501 Not Implemented
ErrorResponse
errorstringAuthentication
bearerAuthHTTP bearer. Daemon API key. Omit on a keyless loopback daemon.Request
▍POST/apps
curl '/apps' \
-X POST \
-H 'Content-Type: application/json' \
-d '{}'const response = await fetch("/apps", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: "{}",
});
const data = await response.json();import requests
response = requests.post(
"/apps",
headers={
"Content-Type": "application/json",
},
data="{}",
)
data = response.json()Response
201 Created
{
"created_at": "2026-01-02T15:04:05Z",
"desired_state": "string",
"disk_bytes": 0,
"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
},
"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"
},
"status": {
"health": "string",
"instance_id": "string",
"last_error": "string",
"phase": "string",
"restarts": 0
},
"updated_at": "2026-01-02T15:04:05Z",
"vcpus": 0
}