# delete\_workflow

Delete the worktrees of an archived workflow's tasks.

writes · idempotent · destructive · CLI only · [Workflow](https://komrad.dev/latest/api/workflow.md)

With records set, delete the workflow for good too, with its archived agents, tasks and schedules.

## Calling it

```bash
curl -X POST http://127.0.0.1:8787/komrad.workflow.v1.WorkflowService/DeleteWorkflow \
  -H 'Content-Type: application/json' \
  -d '{
  "id": "<id>"
}'
```

```bash
komrad rpc delete-workflow \
  --id '<uuid>'
```

## Request

### DeleteWorkflowRequest

| Field | Type | Description |
| --- | --- | --- |
| [`id`](https://komrad.dev/latest/api/workflow/delete-workflow.md#komrad-workflow-v1-DeleteWorkflowRequest-id) | uuid\* | The archived workflow to delete, by id. |
| [`records`](https://komrad.dev/latest/api/workflow/delete-workflow.md#komrad-workflow-v1-DeleteWorkflowRequest-records) | bool | Whether to delete the agents, transcripts, documents, mail, notes and reviews of the workflow's tasks too. False deletes only the tasks' worktrees and keeps the workflow archived. |

## Response

### Empty

No fields.
