---
title: "Create an EdgeStack from a text"
method: POST
path: "/edge_stacks/create/string"
tags: ["edge_stacks"]
---

# Create an EdgeStack from a text

`POST /edge_stacks/create/string`

**Access policy**: administrator

## Query parameters

- `dryrun` string

## Request body

- EdgestacksEdgeStackFromStringPayload
  - `DeploymentType` 0 | 1
  - `EdgeGroups` integer[] — List of identifiers of EdgeGroups
  - `Name` string, required — Name of the stack Max length: 255 Name must only contains lowercase characters, numbers, hyphens, or underscores Name must start with a lowercase character or number Example: stack-name or stack_123 or stackName
  - `Registries` integer[] — List of Registries to use for this stack
  - `StackFileContent` string, required — Content of the Stack file
  - `UseManifestNamespaces` boolean — Uses the manifest's namespaces instead of the default one

## Response `200`

OK

- PortainerEdgeStack
  - `CreatedBy` string — The username which created this stack
  - `CreatedByUserId` string — The username id which created this stack
  - `CreationDate` integer — StatusArray map[EndpointID][]EdgeStackStatus `json:"StatusArray"`
  - `DeploymentType` 0 | 1
  - `EdgeGroups` integer[]
  - `EntryPoint` string
  - `Id` integer — EdgeStack Identifier
  - `ManifestPath` string
  - `Name` string
  - `NumDeployments` integer
  - `ProjectPath` string
  - `Status` object
  - `UseManifestNamespaces` boolean — Uses the manifest's namespaces instead of the default one
  - `Version` integer

## Other responses

- `400` — Bad request
- `500` — Internal server error
- `503` — Edge compute features are disabled

---

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