---
id: workflow-delete
title: "Delete a workflow"
description: "Deletes the workflow: it disappears from lists and reads, along with its revisions and aliases. The record is retained internally (soft delete)."
sidebar_label: "Delete a workflow"
hide_title: true
hide_table_of_contents: true
api: eJztV1Fv20YM/ivEvTTxFDkbMnTQW9qmQIdhKNoUKdAG9VlHSbec7tQjZccz/N8HnmTHcdIG2FMf6hdbFsUjP36kPq4V65pU8UldhXhTubAEg5X1lm3wpK4zZZDKaDu5VoV6hQ4ZCbhBWI5PFGAZjCXddagjQRVDC84SE2hvIKI2lIF2wdewtNyAZYKIC0tyRrLRzmpCyuGyQYhYhmjAihFr69GA9YzRa+dWcEShYjApjuNcZSp0GLWE98aoQu2CGixUpjoddYuMUdJcKytpdJoblSmvW1SFskZlKuLX3kY0quDYY6aobLDVqlgrXnViRRytr9XmEJIdcBErjOhLLEADYVxgPGklcgPWwNFsWX3J83x2DCHew+8ZQeksej4pm0Do4QZXcOTCEmOpCYFcX2fQe/u1R+gwQoi19vbflHSCAG912zkJcll9sdXVi/lV1fX1qVeb60wRln20vErpz1FHjOc9N6r4dC23I1IXPCFJrr+dnsnX/Qwv94KFpaYRfZMLGGcfPz584mXKBzDGEIeizoNZAekVwbLRDEu5vYzB1wVoPxjCTJCeZaCh6VvtT4Q5eu4QZkaI4OSWNxkEDwvtrEkAQKWt6yOS/I+AnuNqQKmq0Bvra6gsOiM4lcEzepZ4ddc5WyYP0y6GucP2l39Igl/vl95ygvXtYKGyLRnC/B8sWR1yQTIl1t7oaMakUuJH716/hOd/nD6H8SwYMqJsIIoBTTD7VkyzVOQuCtPZDoUa4jgk52E8FykEsYEP795kgHmdw6xh7qiYTrc1PaEVMba5wcU0BU13t3zgkyr03szuE+1/+RC+jJA+jPzO99+BYWdPrLnfS1lJR9UY9584Oz1LbSmQPuV6j8lpFhk46BnAW5ldcrb1UszyiXB3idJ0b3ZOH7RipgZg9rzpGPXqQdXeRiTpj8d5XjzNc8vY7h+zY+t9DqUp+P3UiLGjKZXaT8vgK5vmX4tEun4ClbYnhkYvZJ4PkxXG01fwrAwGn6nN9pOp3x+bIh883nZYygAdxuk4UH528s9O/tnJP2QnJ5/cBJFiewpMovsWumtrNkpUinT4oNH66PaIqTub+965zmmuQmzzMrT3hM176fIBiH15s8tJHKlR0cn1YKSy8cfrEFvNqlB/Xl2qTSJLFfZnxlbhkcqUxDjU9jT/NT99UPEXvXUmg66fO0tNBrH3SbVAmKcMd6QlIYXIwP3U7iiNvrYe88/+s38d+gjWoKat8kPgxhKcv31TiMEJTCav7hCdTEBHvCcxwYSyb9Ez5XCxwChSbIEwxzK0SKDB9+0cpbKTyVaZTyYZUAAfuBFKWgKUEewCcT6ceT6o9vE8EdMGupC0OgEH0DuVD0fO3iDMnF3g7DiH85LtQrP41X5Q/3JAkobcR09pR+Bo61p8BT+eeHGLZb9NctwTMOWTcBaOw3yVvrNxKviuZ9GGPQ8/pBYu1DR6fI9lxHFTWehoRW+K8xvEDsqIBj1b7QYDQpaYSbxBqBLEd1ROcrgLxK1OL59xuxhWJtC7YhxyZn33NvsR96uxiRhvedo5bdP8Sx26nTufdlsXpdzu9sdMFdbIFtkEYjFcr+ea8EN0m438/bXHKHvJdaa24KcBINnOnSxjlXaE3wHs6N04k47hB1jEHsVq+4bw8n5YaNfLlcrUDa6G5XNzvclUg9pgTNkPN87LEjvee+SbQkdm4W7qvrr46+LyQmVK3x+CB0MvHfRoZOv1YHEZbtBvNrtAWa4l1s3mPwexs84=
sidebar_class_name: "delete api-method"
info_path: docs/api/workflows
custom_edit_url: null
---

import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
import ParamsDetails from "@theme/ParamsDetails";
import RequestSchema from "@theme/RequestSchema";
import StatusCodes from "@theme/StatusCodes";
import OperationTabs from "@theme/OperationTabs";
import TabItem from "@theme/TabItem";
import Heading from "@theme/Heading";

<Heading
  as={"h1"}
  className={"openapi__heading"}
  children={"Delete a workflow"}
>
</Heading>

<MethodEndpoint
  method={"delete"}
  path={"/workflows/definitions/{id}"}
  context={"endpoint"}
>
  
</MethodEndpoint>



Deletes the workflow: it disappears from lists and reads, along with its revisions and aliases. The record is retained internally (soft delete).

<Heading
  id={"request"}
  as={"h2"}
  className={"openapi-tabs__heading"}
  children={"Request"}
>
</Heading>

<ParamsDetails
  parameters={[{"in":"path","name":"id","required":true,"schema":{"type":"string"},"description":"Workflow reference: a server-minted id (`wf_...`) or the workflow's client-chosen key (lowercase slug, unique per organization).","example":"wf_ifWBbWfpug0n"}]}
>
  
</ParamsDetails>

<RequestSchema
  title={"Body"}
  body={undefined}
>
  
</RequestSchema>

<StatusCodes
  id={undefined}
  label={undefined}
  responses={{"204":{"description":"The workflow was deleted."},"4XX":{"description":"Client error. The body says what went wrong: an error `type`, a human-readable `detail`, and, on validation failures, one entry per offending field.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}},"5XX":{"description":"Unexpected server error.","content":{"application/problem+json":{"schema":{"title":"Problem","type":"object","description":"The standard error body (RFC 7807 problem details, served as `application/problem+json`).","properties":{"type":{"type":"string","description":"Error type URI, e.g. `https://workflow-system.dev/errors/workflow-not-found`.","example":"https://workflow-system.dev/errors/workflow-not-found"},"title":{"type":"string","example":"Not found"},"status":{"type":"integer","example":404},"detail":{"type":"string","example":"No workflow with id wf_ifWBbWfpug0n exists"},"instance":{"type":"string","example":"/workflows/definitions/wf_ifWBbWfpug0n"},"errors":{"type":"array","description":"Present on validation failures: one entry per offending field.","items":{"type":"object","properties":{"path":{"type":"string","example":"/steps/scan/config"},"message":{"type":"string","example":"must have required property 'code'"}}}}}}}}}}}
>
  
</StatusCodes>


      