---
title: "Create a new stack"
method: POST
path: "/api/stacks"
tags: ["Stacks"]
---

# Create a new stack

`POST /api/stacks`

Creates a new stack directory with a default `compose.yaml` file.

## Headers

- `x-node-id` integer

## Request body

- object
  - `stackName` string, required — Stack name. Alphanumeric characters, hyphens, and underscores only.

## Response `201`

Stack created.

- object
  - `message` string, required
  - `name` string, required

## Other responses

- `400` — Invalid stack name.
- `409` — Stack already exists.
- `500` — Internal server error.

---

[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)
