> ## Documentation Index
> Fetch the complete documentation index at: https://dialnexa.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Delete Workflow

> Permanently delete a workflow, along with its nodes, edges, and lead enrollments.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. A public v1 replacement is not currently listed in the v1 reference. This endpoint remains available for existing integrations until then.
</Warning>

Permanently deletes a workflow and everything attached to it: all nodes, all edges, all enrolled leads, and all per-lead progress state. This action cannot be undone. Call logs produced by previously completed calls remain available through [Call Logs](/docs/api-reference/call-logs/list): only the workflow definition and enrollment state are removed.

## When to use this

Workflow deletion is destructive and is intended for tear-down scenarios, not for pausing or temporarily disabling outreach. Use this when:

* A workflow was created in error and you want it permanently removed from your workspace.
* A pilot or experiment is finished, the data has been exported, and you want to clean up the dashboard.
* A workflow is being replaced by a new definition and you do not need the historical enrollment records to remain queryable.

If you only need to stop the workflow temporarily, use [Pause Workflow](/docs/api-reference/workflows/pause) instead. If you want to retire a workflow but keep its records, use [Cancel Workflow](/docs/api-reference/workflows/cancel): cancelled workflows remain visible in the dashboard but stop advancing leads.

## Preconditions

Active workflows must be cancelled before they can be deleted. A workflow is "active" when its `status` is `active` or any leads are still in transit between nodes. Call [Cancel Workflow](/docs/api-reference/workflows/cancel) first, then call this endpoint.

## Path parameters

| Parameter | Description                                      |
| --------- | ------------------------------------------------ |
| `id`      | The workflow ID, for example `wfl_m3v7zb9rk2px`. |

## Errors

* `404 Not Found` is returned when the workflow does not exist or has already been deleted.
* `409 Conflict` is returned when the workflow is still active. Cancel it first.
* `403 Forbidden` is returned when the caller's API key does not have workflow delete permission. See [Access Control](/docs/platform/workspaces).

## Related endpoints

* [Cancel Workflow](/docs/api-reference/workflows/cancel): stop a workflow without removing its records.
* [Pause Workflow](/docs/api-reference/workflows/pause): temporarily halt enrollment progress.
* [List Workflows](/docs/api-reference/v1/workflows/list): confirm the workflow is gone after deletion.


## OpenAPI

````yaml DELETE /workflows/{id}
openapi: 3.0.0
info:
  title: DialNexa API
  description: >-
    Public REST API for the DialNexa voice AI platform. Versioned endpoints are
    under /v1; unversioned endpoints are legacy and deprecated.
  version: 1.0.0
servers:
  - url: https://api.dialnexa.com
    description: DialNexa production API
security:
  - bearer: []
tags:
  - name: API Keys
  - name: Agent Functions
  - name: Agents V1
  - name: Agents2
  - name: Batch Calls
  - name: Batch Calls V1
  - name: Call Logs
  - name: Calls
  - name: Calls V1
  - name: Campaign Leads
  - name: Campaigns
  - name: External Webhooks
  - name: Knowledge Base
  - name: Knowledge Base V1
  - name: LLMs
  - name: LLMs V1
  - name: Languages
  - name: Languages V1
  - name: Organization Phone Numbers
  - name: Organization Phone Numbers V1
  - name: Phone Number Pricing
  - name: Phone Number Pricing V1
  - name: Transcribers
  - name: Transcribers V1
  - name: User Webhooks
  - name: User Webhooks V1
  - name: V1
  - name: Voices
  - name: Voices V1
  - name: Webcall
  - name: Workflow Leads
  - name: Workflow Leads V1
  - name: Workflows
  - name: Workflows V1
paths:
  /workflows/{id}:
    delete:
      tags:
        - Workflows
      summary: Soft-delete a workflow by ID
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: WorkflowsController_softDelete
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: x-organization-id
          in: header
          description: RSA encrypted organization ID (base64 format)
          required: true
          schema:
            type: string
            example: BASE64_ENCRYPTED_ORG_ID_HERE
      responses:
        '200':
          description: Workflow soft-deleted successfully
        '404':
          description: Workflow not found
        '500':
          description: Internal Server Error
      deprecated: true
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````