---
title: "Cancel one in-progress workflow run"
method: POST
path: "/workflows/{workflowKey}/runs/{runId}/cancel"
tags: ["workflows"]
---

# Cancel one in-progress workflow run

`POST /workflows/{workflowKey}/runs/{runId}/cancel`

## Request

- Base URL: `https://api.mailly.site` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mailly.site/workflows/{workflowKey}/runs/{runId}/cancel`
- Auth: HTTP bearer

Stops a queued, running or waiting run before its remaining steps. Emails already handed to sending are not recalled and other runs are untouched. Cancelling a run that already ended is a no-op that returns cancelled=false.

## Path parameters

- `workflowKey` string, required
- `runId` string, required: run ID

## Request body

- object
  - `reason` string: Why the run is cancelled, kept in the run log (1-500 characters)

## Response `200`

Cancelled, or already ended

- object
  - `success` boolean, required
  - `cancelled` boolean, required
  - `run` object, required
  - `platformFailures` string[], required

## Other responses

- `400`: Invalid parameters
- `401`: Missing or invalid API key
- `404`: Workflow not found

---

[API](https://skmtc.dev/mailly/apis/mailly-api.md) · [All operations](https://skmtc.dev/mailly/apis/mailly-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailly/apis/mailly-api/revisions/1ceb29637301?raw)
