---
title: "Deletes a workflow."
method: POST
path: "/workflows/{workflowId}/delete"
tags: ["workflows"]
---

# Deletes a workflow.

`POST /workflows/{workflowId}/delete`

If the workflow is linked to projects or project templates they can either be unlinked
            or migrated to another workflow before the workflow is deleted.

<Check title="Required Permissions" icon="key">The user must be an admin or have `project-manage-config:write` permissions.</Check>

## Path parameters

- `workflowId` string, uuid, required

## Headers

- `Authorization` string, required

## Request body

- DeleteWorkflowForm — The form for deleting a workflow.
  - `deleteOperation` string, nullable — Defines how linked projects and project templates should be handled before deletion. Supported values are 'unlink' and 'migrate'.
  - `newWorkflowId` string, uuid, nullable — The workflow to migrate linked projects and project templates to. Required when DeleteOperation is 'migrate'.
  - `projectStatusMapping` ProjectStatusMappingEntry[], nullable — Maps source workflow project statuses to target workflow project statuses during migration.
    - `oldProjectStatusId` string, uuid, required — The Id of the existing project status to replace.
    - `newProjectStatusId` string, uuid, required — The Id of the workflow project status to use instead.
  - `taskStatusMapping` TaskStatusMappingEntry[], nullable — Maps source workflow task statuses to target workflow task statuses during migration.
    - `oldTaskStatusId` string, uuid, required — The Id of the existing task status to replace.
    - `newTaskStatusId` string, uuid, required — The Id of the workflow task status to use instead.
  - `keepCustomFields` boolean, nullable — Whether to keep existing non-workflow custom fields when migrating. Default: true.
  - `keepCustomAutomations` boolean, nullable — Whether to keep existing non-workflow automations when migrating. Default: true.

## Response `204`

No Content

- object

## Other responses

- `400` — Bad Request
- `404` — Not Found

---

[API](https://skmtc.net/awork-io/apis/api-v1-reference.md) · [All operations](https://skmtc.net/awork-io/apis/api-v1-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/awork-io/api-v1-reference/versions/f784a53f60df/schema)
