---
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.

## Changes

- **2026-06-04** `d58cf9d6195b` — 3 info
  - removed the `ADMIRAL_REQUIRED` enum value from the `code` response property for the response status `400`
  - removed the `ADMIRAL_REQUIRED` enum value from the `code` response property for the response status `409`
  - removed the `ADMIRAL_REQUIRED` enum value from the `code` response property for the response status `500`
- **2026-04-05** `7464894ea582` — 3 warning, 3 info
  - added the new `PAID_REQUIRED` enum value to the `code` response property for the response status `400`
  - added the new `PAID_REQUIRED` enum value to the `code` response property for the response status `409`
  - added the new `PAID_REQUIRED` enum value to the `code` response property for the response status `500`
  - removed the `PRO_REQUIRED` enum value from the `code` response property for the response status `400`
  - …2 more

[Change history](https://skmtc.dev/studio-saelix/apis/sencho-api/changes/api/stacks/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)
