---
title: "Cancel a GitHub Pages deployment"
method: POST
path: "/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel"
tags: ["repos"]
---

# Cancel a GitHub Pages deployment

`POST /repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel`

Cancels a GitHub Pages deployment.

The authenticated user must have write permissions for the GitHub Pages site.

## Path parameters

- `owner` string, required
- `repo` string, required
- `pages_deployment_id` union, required
  - integer
  - string

## Response `204`

A header with no content is returned.

## Other responses

- `404` — Resource not found

---

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