Expose a unit
POST https://repopack.com/api/v0/projects/<key>/apps/<app>/expose
Authorization: Bearer <token>
Content-Type: application/json
{"unit":"web"}
Requires app.write; optional unit selects a public unit, while omitting it clears the public binding. Returns {app,unit} when a unit was selected, or {app} when cleared. This changes configuration, not a deployment or App name.
Start and stop
POST /api/v0/projects/<key>/apps/<app>/start with Authorization: Bearer <token>, Content-Type: application/json and body {} starts the current deployment runtime. An ordinary App needs app.operate; a visible task preview can instead use app.preview and its task access checks. A normal App with no public unit returns 400; no deployment or already running returns 409 with app_has_no_deployment or app_already_running. POST /api/v0/projects/<key>/apps/<app>/stop with the same headers/body stops the runtime; already stopped is 409 app_already_stopped, success {ok:true}. A missing/unreadable project returns 401; missing authority 403. Neither action creates a new deployment; inspect App state before repeating after a timeout.