---
title: "Pull and recreate stack"
method: POST
path: "/api/stacks/{stackName}/update"
tags: ["Stacks"]
---

# Pull and recreate stack

`POST /api/stacks/{stackName}/update`

Pulls latest images and recreates containers (`docker compose pull && up -d`)
using atomic update with automatic rollback on failure.
Requires `stack:deploy` permission.

## Path parameters

- `stackName` string, required

## Headers

- `x-node-id` integer

## Response `200`

Update completed.

- object
  - `status` string, required
  - `healthGateId` string, nullable — Id of the post-update health gate observation started for this update, for use with the health-gate endpoint. Null when the health gate is disabled on the node.
  - `recheckWarning` string — Present when Compose succeeded but post-update image verification still reports an available update or could not fully verify clearance. Optional for older nodes.

## Other responses

- `403` — Insufficient permissions or license tier.
- `500` — Update failed.

## Changes

- **2026-07-26** `dd99475c11b1` — 1 info
  - added the optional property `recheckWarning` to the response with the `200` status
- **2026-06-11** `0c52a6705499` — 2 info
  - added the optional property `failure` to the response with the `500` status
  - added the optional property `healthGateId` to the response with the `200` status
- **2026-06-04** `d58cf9d6195b` — 1 info
  - removed the `ADMIRAL_REQUIRED` enum value from the `code` response property for the response status `403`
- **2026-04-05** `7464894ea582` — 1 warning, 1 info
  - added the new `PAID_REQUIRED` enum value to the `code` response property for the response status `403`
  - removed the `PRO_REQUIRED` enum value from the `code` response property for the response status `403`
- **2026-04-01** `c62bbceae824` — 1 breaking
  - added the pattern `^[a-zA-Z0-9_-]+$` to the `path` request parameter `stackName`

[Change history](https://skmtc.dev/studio-saelix/apis/sencho-api/changes/api/stacks/:stackName/update/post.md)

---

[API](https://skmtc.dev/studio-saelix/apis/sencho-api.md) · [All operations](https://skmtc.dev/studio-saelix/apis/sencho-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/studio-saelix/sencho-api/revisions/82aac94c016e/schema)
