---
title: "Cancel an exact deploy operation before container replacement"
method: POST
path: "/platform/deployments/{id}/cancel"
tags: ["Platform"]
---

# Cancel an exact deploy operation before container replacement

`POST /platform/deployments/{id}/cancel`

## Request

- Base URL: `https://api.imprezahost.com/v1`
- URL: `https://api.imprezahost.com/v1/platform/deployments/{id}/cancel`
- Auth: API key in header `X-API-Key` and API key in header `X-API-Secret`

Requires manage permission. Queued jobs are cancelled immediately; running preparation requires agent 0.6.5+. A running pull/build finishes its current step before cancellation is confirmed. Replacement/recovery cannot be cancelled. HTTP 202 is only a request. Poll last_operation.status and cancellation; only cancelled confirms the stop. Task cancellation is separate. Controlled jobs with an interrupted agent are not automatically redispatched.

## Path parameters

- `id` string, required

## Request body

- object
  - `command_id` string, required

## Response `200`

Queued or already confirmed cancellation

## Other responses

- `202`: Request recorded; agent confirmation pending
- `400`: Invalid command identifier
- `404`: Deployment or exact operation not found on this account
- `409`: Finished

---

[API](https://skmtc.dev/imprezahost/apis/impreza-host-public-api.md) · [All operations](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/imprezahost/apis/impreza-host-public-api/revisions/db86511f604f?raw)
