---
title: "Cancel a deployment"
method: POST
path: "/projects/{project_id}/deployments/{deployment_id}/cancel"
tags: ["Projects"]
---

# Cancel a deployment

`POST /projects/{project_id}/deployments/{deployment_id}/cancel`

## Request

- Base URL: `/api` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/api/projects/{project_id}/deployments/{deployment_id}/cancel`
- Auth: none declared

## Path parameters

- `project_id` integer, required
- `deployment_id` integer, required

## Response `200`

Deployment cancelled successfully

- DeploymentStateResponse
  - `id` integer, required
  - `message` string, required
  - `state` string, required

## Other responses

- `400`: Deployment cannot be cancelled (already completed, failed, or cancelled)
- `404`: Project or deployment not found
- `500`: Internal server error

---

[API](https://skmtc.dev/gotempsh/apis/temps.md) - [All operations](https://skmtc.dev/gotempsh/apis/temps/llms.txt) - [OpenAPI document](https://skmtc.dev/gotempsh/apis/temps/revisions/3b040526eb43?raw)
