Update or retry a deployment
POST
Installs the template's latest version, or runs the install again after a failed or unconfirmed run (installs are safe to repeat).
Access: API key: vm:write · Session: developer, admin or owner.
- A version that opens new ports needs them in
confirm_ports(400 ports_not_confirmed). - A deployment already on the latest version returns
409. Templates it needs must be ready on the server. - A deployment with an edited script cannot be retried while editing scripts is not available (
403).
header
AuthorizationBearer <token>Send Authorization: Bearer <token>. A token is an API key (lb_live_…, scoped, for programs) or a session (lb_sess_…, from signup or login, for people). See Authentication above.
id*stringThe resource id.
X-Org-ID?stringSessions only: act on this organization (you must be a member). Default: your first organization.
application/json- body
confirm_ports?array<string>Accepted: the template is being updated
application/json- response
deployment*dependencies*array<>Templates deployed first in the same request.
operation*curl -X POST 'https://layerbeat.com/v1/deployments/string/update' \ -H 'Content-Type: application/json' \ -d '{ "confirm_ports": [ "443/tcp" ]}'{ "deployment": { "id": "dep_7m2k9q4w8x3z5t6v1b0n2h4ra", "template": { "id": "supabase", "name": "Supabase", "kind": "service" }, "version": "1.0.0", "latest_version": "1.0.0", "update_available": false, "customized": false, "status": "updating", "server": { "id": "vm_gnkrp6zuxvsqki7sqxeluvsw2y", "name": "agent-01" }, "url": "https://supabase.example.com", "note": null, "error": null, "output": "layerbeat-template id=supabase version=1.0.0 action=install status=ok url=https://supabase.example.com", "ports_opened": [ { "port": 80, "protocol": "tcp" }, { "port": 443, "protocol": "tcp" } ], "operation": { "id": "op_4yw4xmradad4bstgr4d5qtreb4", "type": "template.update", "status": "pending" }, "created_at": "2026-10-10T10:00:00Z", "updated_at": "2026-10-10T10:04:00Z", "checked_at": "2026-10-10T10:04:00Z" }, "dependencies": [], "operation": { "id": "op_4yw4xmradad4bstgr4d5qtreb4", "type": "template.update", "status": "pending", "vm_id": "vm_gnkrp6zuxvsqki7sqxeluvsw2y", "volume_id": null, "deployment_id": "dep_7m2k9q4w8x3z5t6v1b0n2h4ra", "steps": [ { "name": "opening_ports", "status": "running" }, { "name": "running", "status": "pending" } ], "result": null, "error": null, "created_at": "2026-10-10T10:00:00Z", "finished_at": null }}