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

Cancel a workflow run

Cancels a workflow run using its id.

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

  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

3 parameters
ownerstringrequired
The account owner of the repository. The name is not case sensitive.
repostringrequired
The name of the repository without the `.git` extension. The name is not case sensitive.
run_idintegerrequired
The unique identifier of the workflow run.

2 status codes
202Response
409Conflict
messagestringoptional
documentation_urlstringoptional
urlstringoptional
statusstringoptional

Error handling

A 409 is returned: Conflict.