---
title: "Cancel a run"
---

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

# Cancel a run

Path: cloudraker.run API

`DELETE /_run/{id}`

Cancel a run.

## Authentication

- `bearer`, http, header `Authorization`

## Path parameters

- `id` (`deleteRunById.path.id`; string, required)

## Code samples

### cURL

```bash
curl --request DELETE \
  --url 'https://your-org.cloudraker.run/_run/<id>' \
  --header 'Authorization: Bearer <token>'
```

### TypeScript

```typescript
const url = 'https://your-org.cloudraker.run/_run/<id>';
const options = {method: 'DELETE', headers: {Authorization: 'Bearer <token>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://your-org.cloudraker.run/_run/<id>"

headers = {"Authorization": "Bearer <token>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 200

The run after cancel.

#### Example

```json
{}
```

### 4XX

Error. See the `code` table in the guides.

#### Example

```json
{
  "error": {
    "code": "run_busy",
    "message": "string",
    "run_id": "string",
    "details": null
  }
}
```

- `error` (`deleteRunById.response.4XX.error`; object, required)
  - `code` (`deleteRunById.response.4XX.error.code`; string, required)
    - example `"run_busy"`
  - `message` (`deleteRunById.response.4XX.error.message`; string, required)
  - `run_id` (`deleteRunById.response.4XX.error.run_id`; string, optional)
  - `details` (`deleteRunById.response.4XX.error.details`; unknown, optional)


Source: https://docs.cloudraker.com/run/api/delete-run-by-id/index.md
