> ## 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 Execution

Use this API to cancel a running execution. Terminal executions are a no-op.

# Endpoint

`POST https://api.velt.dev/v2/workflow/executions/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 to cancel.

**reason** `string`

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

## **Example Requests**

#### Cancel an execution

```JSON theme={null}
{
  "data": {
    "executionId": "exec_1777374504255_xzy43k9q",
    "reason": "Campaign postponed"
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "cancelled": true,
    "executionId": "exec_1777374504255_xzy43k9q"
  }
}
```

#### Failure Response

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

**Errors:** `NOT_FOUND` / `INVALID_ARGUMENT`.

```js theme={null}
{
  "result": {
    "cancelled": true,
    "executionId": "exec_1777374504255_xzy43k9q"
  }
}
```


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