---
title: "Cancel a deployment"
method: POST
path: "/api/unstable/fleet/deployments/{deployment_id}/cancel"
tags: ["Fleet Automation"]
---

# Cancel a deployment

`POST /api/unstable/fleet/deployments/{deployment_id}/cancel`

Cancel an active deployment and stop all pending operations.
When you cancel a deployment:
- All pending operations on hosts that haven't started yet are stopped
- Operations currently in progress on hosts may complete or be interrupted, depending on their current state
- Configuration changes or package upgrades already applied to hosts are not rolled back

After cancellation, you can view the final state of the deployment using the GET endpoint to see which hosts
were successfully updated before the cancellation.

## Path parameters

- `deployment_id` string, required

## Response `204`

Deployment successfully canceled.

## Other responses

- `400` — Bad Request
- `401` — Unauthorized
- `403` — Forbidden
- `404` — Not Found
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v2.md) · [All operations](https://skmtc.net/datadog/apis/api-v2/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v2/revisions/da68bf029e4c/schema)
