---
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`

## Request

- Base URL: `https://api.github.com`
- URL: `https://api.github.com/repos/{owner}/{repo}/pages/deployments/{pages_deployment_id}/cancel`
- Auth: none declared

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.dev/github/apis/rest.md) - [All operations](https://skmtc.dev/github/apis/rest/llms.txt) - [OpenAPI document](https://skmtc.dev/github/apis/rest/revisions/309e30296b21?raw)
