Portainer Stacks API

Manage stacks

Operations 22

GET /stacks List stacks #
DELETE /stacks/{id} Remove a stack #
GET /stacks/{id} Inspect a stack #
PUT /stacks/{id} Update a stack #
PUT /stacks/{id}/associate Associate an orphaned stack to a new environment(endpoint) #
GET /stacks/{id}/file Retrieve the content of the Stack file for the specified stack #
POST /stacks/{id}/git Update a stack's Git configs #
PUT /stacks/{id}/git/redeploy Redeploy a stack #
POST /stacks/{id}/migrate Migrate a stack to another environment(endpoint) #
POST /stacks/{id}/start Starts a stopped Stack #
POST /stacks/{id}/stop Stops a stopped Stack #
POST /stacks/create/kubernetes/repository Deploy a new kubernetes stack from a git repository #
POST /stacks/create/kubernetes/string Deploy a new kubernetes stack from a file #
POST /stacks/create/kubernetes/url Deploy a new kubernetes stack from a url #
POST /stacks/create/standalone/file Deploy a new compose stack from a file #
POST /stacks/create/standalone/repository Deploy a new compose stack from repository #
POST /stacks/create/standalone/string Deploy a new compose stack from a text #
POST /stacks/create/swarm/file Deploy a new swarm stack from a file #
POST /stacks/create/swarm/repository Deploy a new swarm stack from a git repository #
POST /stacks/create/swarm/string Deploy a new swarm stack from a text #
DELETE /stacks/name/{name} Remove Kubernetes stacks by name #
POST /stacks/webhooks/{webhookID} Webhook for triggering stack updates from git #

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/portainer-stacks-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

portainer-stacks-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  contact:
    email: info@portainer.io
  description: Portainer API is an HTTP API served by Portainer.
  license:
    name: zlib
    url: https://github.com/portainer/portainer/blob/develop/LICENSE
  title: PortainerCE Stacks API
  version: 2.39.1
servers:
- url: /api
tags:


# --- truncated at 32 KB (45 KB total) ---
# Full source: https://raw.githubusercontent.com/api-evangelist/portainer/refs/heads/main/openapi/portainer-stacks-api-openapi.yml