Skip to content

Cancel a workflow run

POST
/repos/{owner}/{repo}/actions/runs/{run_id}/cancel

Cancels a workflow run using its id.

OAuth tokens and personal access tokens (classic) need the repo scope to use this endpoint.

API method documentation

owner
required
string

The account owner of the repository. The name is not case sensitive.

repo
required
string

The name of the repository without the .git extension. The name is not case sensitive.

run_id
required
integer

The unique identifier of the workflow run.

Response

Media type application/json
Empty Object

An object without any properties.

object
Examples
Example default
null

Conflict

Media type application/json
Basic Error

Basic Error

object
message
string
documentation_url
string
url
string
status
string
Example generated
{
"message": "example",
"documentation_url": "example",
"url": "example",
"status": "example"
}