# Delete Workflow

`DELETE /workflows/{wflId}` · Core · Compute & Automation

Permanently deletes a workflow by its `wfl_<base62>` identifier. Requires the `PROJECT_AUTHOR` role. Returns `K9O_WORKFLOW_NOT_FOUND` (404) if the workflow does not exist in the project.

## Parameters

| Name | In | Required | Description |
|---|---|---|---|
| `wflId` | path | yes | The workflow id (`wfl_...`). Example: `"wfl_demo00000001"`. |
| `projectSlug` | path | yes | The project's slug: the path segment after `@`. It is unique within the org. Example: `"storefront"`. |

## Responses

- **200**: Success

| Field | Type | Required | Description |
|---|---|---|---|
| `data` | object | yes | The workflow that was deleted. |
| `data.id` | string | yes | The deleted workflow (`wfl_...`). |
| `data.status` | enum ("deleted") | yes | Always `deleted`. The workflow's runs were deleted with it, and approvals its runs were waiting on were cancelled. |
| `meta` | object | yes |  |


## Errors

| HTTP | Code | When |
|---|---|---|
| 401 | `K9O_INVALID_CREDENTIALS` | The request was made without a valid session or bearer token. |
| 401 | `K9O_SESSION_EXPIRED` | Your session has expired; re-authenticate and retry. |
| 403 | `K9O_ACCESS_DENIED` | Deleting a workflow requires the PROJECT_AUTHOR role; your current role does not grant it. |
| 404 | `K9O_WORKFLOW_NOT_FOUND` | No workflow with the supplied ID exists in this project. |

## Code samples

### cURL

```bash
curl -X DELETE 'https://<org>.api-<region>.k9o.io/@storefront/workflows/wfl_demo00000001' \
  -H 'Authorization: Bearer $K9O_TOKEN'
```

### fetch

```javascript
const res = await fetch('https://<org>.api-<region>.k9o.io/@storefront/workflows/wfl_demo00000001', {
  method: 'DELETE',
  headers: {
    'Authorization': `Bearer ${process.env.K9O_TOKEN}`
  },
});
const { data, meta } = await res.json();
```

### @k9o/core

```typescript
// const k9o = new K9o({ orgSlug: 'playground', projectSlug: 'storefront', apiKey: 'k9o_…' })
const { data } = await k9o.studio.workflows.delete('wfl_demo00000001')
```

### k9o

```python
# k9o = create_client(org_slug="playground", project_slug="storefront", api_key="k9o_…")
response = k9o.studio.workflows.delete("wfl_demo00000001")
```

### sdk-go

```go
// ctx := context.Background()
// client, _ := k9o.NewClient(k9o.ClientOpts{OrgSlug: "playground", ProjectSlug: "storefront", APIKey: "k9o_…"})
data, _, kerr := client.Studio.Workflows.Delete(ctx, "wfl_demo00000001")
```

### k9o

```rust
// let k9o = Client::new(ClientOpts { org_slug: "playground".into(), project_slug: "storefront".into(), api_key: "k9o_…".into() })?;
let resp = k9o.studio.workflows.delete("wfl_demo00000001").await?
```

### dev.k9o:core

```java
// K9o k9o = K9o.createClient(K9o.Opts.builder().orgSlug("playground").projectSlug("storefront").apiKey("k9o_…").build());
var response = k9o.studio().workflows().delete("wfl_demo00000001")
```

### K9o.Core

```c#
// var k9o = K9oClient.Create(new K9oOptions { OrgSlug = "playground", ProjectSlug = "storefront", ApiKey = "k9o_…" });
var response = await k9o.Studio.Workflows.DeleteAsync("wfl_demo00000001")
```

### k9o

```ruby
# k9o = K9o.create_client(org_slug: "playground", project_slug: "storefront", api_key: "k9o_…")
response = k9o.studio.workflows.delete("wfl_demo00000001")
```

### k9o/sdk

```php
// $k9o = K9oClient::create(['org_slug' => 'playground', 'project_slug' => 'storefront', 'api_key' => 'k9o_…']);
$response = $k9o->studio->workflows->delete('wfl_demo00000001')
```


Canonical page: https://docs.kilimanjaro.dev/api-playground/core/delete-workflow
