---
title: "Cancel deployment workflow run"
method: POST
path: "/api/projects/{projectId}/runs/{runId}/cancel"
tags: ["Deployment workflows"]
---

# Cancel deployment workflow run

`POST /api/projects/{projectId}/runs/{runId}/cancel`

Cancel an in-progress or waiting deployment workflow run.

## Path parameters

- `projectId` string, uuid, required
- `runId` string, uuid, required

## Request body

- object
  - `comment` string, required — Reason for cancelling the workflow run

## Response `200`

Cancelled deployment workflow run

- object — Cancelled deployment workflow run
  - `id` string, uuid, required — Workflow run unique identifier
  - `name` string, nullable, required — Workflow run name
  - `status` 'in_progress' | 'completed' | 'cancelled' | 'waiting' | 'failure', required — Current status of the workflow run
  - `runVersion` 'v2' | 'null', nullable — Workflow run version
  - `releaseId` string, uuid, required — Associated release ID
  - `release` object, nullable — Associated release
    - `id` string, uuid, required — Release unique identifier
    - `name` string, nullable, required — Release name
    - `version` string, nullable, required — Release version
  - `projectId` string, uuid, required — Project ID
  - `createdById` string, uuid, required — ID of user who created the run
  - `createdBy` object, nullable — User who created the run
    - `id` string, uuid, required — User unique identifier
    - `email` string, email, required — User email address
    - `firstName` string, nullable, required — User first name
    - `lastName` string, nullable, required — User last name
  - `createdAt` string, required — Timestamp when the run was created
  - `completedAt` string, nullable — Timestamp when the run was completed
  - `cancelledById` string, uuid, nullable — ID of user who cancelled the run
  - `cancelledBy` object, nullable — User who cancelled the run
    - `id` string, uuid, required — User unique identifier
    - `email` string, email, required — User email address
    - `firstName` string, nullable, required — User first name
    - `lastName` string, nullable, required — User last name
  - `cancelledComment` string, nullable — Cancellation reason
  - `jobs` object[] — List of jobs in the workflow run
    - `id` string, uuid, required — Job unique identifier
    - `status` 'not_started' | 'in_progress' | 'waiting' | 'failure' | 'rejected' | 'completed', required — Current status of the job
    - `order` number, required — Order of the job in the workflow
    - `environmentId` string, uuid, nullable, required — Associated environment ID
    - `environment` object, nullable — Associated environment
      - `id` string, uuid, required — Environment unique identifier
      - `name` string, required — Environment name
      - `key` string, nullable, required — Environment key
    - `projectId` string, uuid, required — Project ID
    - `deploymentWorkflowRunId` string, uuid, required — Parent workflow run ID
    - `reviewedAt` string, nullable — Timestamp when the job was reviewed
    - `reviewedBy` object, nullable — User who reviewed the job
      - `id` string, uuid, required — User unique identifier
      - `email` string, email, required — User email address
      - `firstName` string, nullable, required — User first name
      - `lastName` string, nullable, required — User last name
    - `reviewedComment` string, nullable — Review comment
    - `reviewedConclusion` 'approved' | 'rejected' | 'null', nullable — Review conclusion (approved or rejected)
    - `previousRelease` object, nullable — Previous release before deployment
      - `id` string, uuid, required — Release unique identifier
      - `name` string, nullable, required — Release name
      - `version` string, nullable, required — Release version
    - `previousReleaseId` string, uuid, nullable — Previous release ID
    - `event` string, nullable — Event type
    - `data` unknown
    - `createdAt` string, required — Timestamp when the job was created

---

[API](https://skmtc.dev/gorules/apis/gorules-agent-api.md) · [All operations](https://skmtc.dev/gorules/apis/gorules-agent-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/gorules/gorules-agent-api/revisions/52c0773fcd80/schema)
