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

# Delete benchmark

> Delete a draft or a stopped benchmark.

Delete a draft or a stopped benchmark, with its sampled calls and what it already measured. A running or finished benchmark cannot be deleted.

## Parameters

**benchmark\_uuid** `string` *required*

The benchmark's id.

The response also carries `blockers` (what prevents the usual next step), in plain words. It is empty when the usual workflow applies.

```python Python theme={null}
import weflayr
from uuid import UUID

client = weflayr.client()  # reads WEFLAYR_API_KEY

client.delete_benchmark(benchmark_uuid=UUID("5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01"))
```

```js Node.js theme={null}
const weflayr = require('weflayr');

const client = weflayr.client(); // reads WEFLAYR_API_KEY

await weflayr.api.deleteBenchmark({
  client,
  throwOnError: true,
  query: {
    benchmarkUuid: '5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01',
  },
});
```

```bash cURL theme={null}
curl -X DELETE "https://app.weflayr.com/api/benchmarks/?benchmark_uuid=5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01" \
  -H "Authorization: Bearer $WEFLAYR_API_KEY"
```

```json 200 theme={null}
{
  "benchmark_uuid": "5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01",
  "deleted": true,
  "blockers": []
}
```

```json 401 theme={null}
{"error": "Invalid or missing API key. Send it as \"Authorization: Bearer <your key>\"."}
```

```json 400 theme={null}
{"error": "A running benchmark cannot be removed. Read its status with get_benchmark.", "code": "invalid_benchmark_action"}
```

```json 404 theme={null}
{"error": "No benchmark of this project has the id 5c1d6a52-3f5f-4c53-9a0e-6f2b9c7d8e01. List the project's benchmarks with get_benchmarks."}
```

```json 422 theme={null}
{"error": "Invalid request payload.", "detail": [{"field": "benchmark_uuid", "error": "Field required"}]}
```


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