---
title: "Update an EdgeStack"
method: PUT
path: "/edge_stacks/{id}"
tags: ["edge_stacks"]
---

# Update an EdgeStack

`PUT /edge_stacks/{id}`

**Access policy**: administrator

## Path parameters

- `id` integer, required

## Request body

- EdgestacksUpdateEdgeStackPayload
  - `DeploymentType` 0 | 1
  - `EdgeGroups` integer[]
  - `StackFileContent` string
  - `UpdateVersion` boolean
  - `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)
