# Delete workflow

Deletes a workflow and its versions, triggers, and execution records. This cannot be undone.

```text
DELETE $CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/{workflow_id}
```

## Before you call this API

Configure the [regional API endpoint and authentication](https://omnifabric.cloudsigma.com/docs/developer/endpoints-and-authentication.html.md), and select the target workspace.

Use [Get workflow details](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/workflows/get-workflow.html.md#path-parameters) to confirm the workflow.

## Path parameters

Replace `$CLOUDSIGMA_API_KEY`, `$WORKSPACE_ID`, and `$WORKFLOW_ID` with your own values.

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Call example

```bash
curl -X DELETE "$CLOUDSIGMA_API_BASE/workflow/v2/workflow-apps/$WORKFLOW_ID" \
  -H "X-API-Key: $CLOUDSIGMA_API_KEY" \
  -H "X-Workspace-ID: $WORKSPACE_ID"
```

:::::
:::::{tab-item} Parameter reference

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `workflow_id` | string | Yes | Workflow ID to delete. |

:::::
::::::
:::::::

## Successful response

Returns 200. `deleted` is `true` when the workflow has been deleted.

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{"code": "OK", "msg": "OK", "data": {"deleted": true}}
```

:::::
:::::{tab-item} Field reference

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | `OK` on success. |
| `msg` | string | `OK` on success. |
| `data.deleted` | boolean | Whether the workflow was deleted. |

:::::
::::::
:::::::

## Error response

:::::::{div} mo-api-tabs
::::::{tab-set}
:::::{tab-item} Response example

```json
{"code": "ErrConflict", "msg": "Resource state conflict", "data": null}
```

:::::
:::::{tab-item} Field reference

| Field | Type | Description |
| --- | --- | --- |
| `code` | string | Error code. |
| `msg` | string | Error message. |
| `data` | null | Empty on error. |

:::::
::::::
:::::::

## Next steps

Use [List workflows](https://omnifabric.cloudsigma.com/docs/reference/api/ai-studio/data-processing/workflows/list-workflows.html.md#query-parameters) with the same filters to confirm that the workflow is no longer returned.
