> ## Documentation Index
> Fetch the complete documentation index at: https://velt.dev/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Cancel Step

Use this API to admin-cancel a specific step. The step transitions to `cancelled`, no downstream edges fire from it, and a `step.cancelled` event is emitted.

# Endpoint

`POST https://api.velt.dev/v2/workflow/steps/cancel`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**executionId** `string` *required*

The execution containing the step.

**stepId** `string` *required*

The step to cancel.

**reason** `string`

≤ 500 chars. Surfaced on the `step.cancelled` event.

**actorId** `string` *required*

1–256 chars. Identifier of the administrator initiating the cancellation. Recorded on the `step.cancelled` audit event.

> [!NOTE]
>
> **Workspace-admin RBAC is post-GA.** Today this endpoint gates on the standard `x-velt-auth-token` only. Until role-based access lands, restrict who can call `/steps/cancel` inside your own application.

## **Example Requests**

#### Admin-cancel a step

```JSON theme={null}
{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_agent-draft_..._lwofay__to__human-brand",
    "reason": "Reviewer unavailable",
    "actorId": "admin_jane"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "cancelled": true,
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_agent-draft_..._lwofay__to__human-brand"
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "FAILED_PRECONDITION"
  }
}
```

**Errors:** `INVALID_ARGUMENT` (schema validation) / `FAILED_PRECONDITION` (step already terminal) / `NOT_FOUND`.

```js theme={null}
{
  "result": {
    "cancelled": true,
    "executionId": "exec_1777374504255_xzy43k9q",
    "stepId": "step_agent-draft_..._lwofay__to__human-brand"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.