---
title: "Deploy stack"
method: POST
path: "/api/stacks/{stackName}/deploy"
tags: ["Stacks"]
---

# Deploy stack

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

Runs `docker compose up -d` for the stack using atomic deployment
with automatic rollback on failure. Requires `stack:deploy` permission.

## Path parameters

- `stackName` string, required

## Headers

- `x-node-id` integer

## Response `200`

Stack deployed successfully.

- object
  - `message` string, required
  - `healthGateId` string, nullable — Id of the post-deploy health gate observation started for this deploy, for use with the health-gate endpoint. Null when the health gate is disabled on the node.

## Other responses

- `403` — Insufficient permissions or license tier.
- `409` — Deploy blocked before Compose ran. Common codes include a stack operation already in progress, a scan-policy block, or missing external networks (`code: missing_external_networks`).
- `500` — Deployment failed.
- `503` — Deploy blocked because Sencho could not render the Compose model or read Docker networking state to verify required external networks.

---

[API](https://skmtc.net/studio-saelix/apis/sencho-api.md) · [All operations](https://skmtc.net/studio-saelix/apis/sencho-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/studio-saelix/sencho-api/versions/f36f82acae1d/schema)
