# Stop a running workflow run

Stops one run that is still going, at its next step. The steps it already took STAND — nothing it did is undone. This ends one execution, not the rule: a rule that should stop firing at all is archived through `patch_workflows_id`.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/workflows/runs/{id}/cancel`

## Parameters

| Name | In | Type | Required |
| --- | --- | --- | --- |
| id | path | string | Yes |

## Request body

Content type: `application/json`.

```json
{
  "body": {},
  "params": {
    ":id": "string"
  },
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "run": {
      "claimedAt": "string",
      "claimedBy": "string",
      "context": "string",
      "createdAt": "string",
      "cursorStep": 1,
      "errorText": "string",
      "finishedAt": "string",
      "id": 1,
      "nextAttemptAt": "string",
      "startedAt": "string",
      "status": "string",
      "subjectDefinitionId": "",
      "subjectRowId": "",
      "triggerActivityId": 1,
      "triggerKind": "string",
      "updatedAt": "string",
      "version": 1,
      "versionId": 1,
      "workflowId": 1,
      "workflowKey": "string",
      "workflowName": "string"
    }
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
