> ## 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.

# Cancel Workflow

> Permanently cancel a workflow. Leads in active steps finish; no further steps fire. Cancellation cannot be reversed.

<Warning>
  **Legacy endpoint - deprecated.** Unversioned endpoints are scheduled for removal on **July 31, 2026**. There is no public `/v1` replacement documented for cancelling a workflow yet. Keep existing integrations on this endpoint until DialNexa publishes a replacement.
</Warning>

Cancels a workflow permanently. Any lead that is currently in an active step, for example a live voice call or a webhook delivery, is allowed to finish that step, but no further steps are triggered for any lead in the workflow. The `status` transitions to `cancelled` and cannot be returned to `active` or `paused`. To run a similar workflow again, create a new one with [Create Workflow](/docs/api-reference/workflows/create) (or use [Duplicate Workflow](/docs/api-reference/workflows/duplicate) to clone the cancelled one as a starting point).

## When to use this

Cancellation is the right verb when you have decided the workflow's work is done, not just temporarily on hold. Common cases:

* **End of campaign**: the outreach window has closed and you want to formally finish the workflow even if some leads have not yet been dialled.
* **Compliance escalation**: a complaint or audit requires you to stop all enrolled leads immediately and permanently.
* **Replacement rollout**: a new workflow definition is taking over, and you want the old one to stop firing while keeping its records for audit.

If you only need a temporary stop, use [Pause Workflow](/docs/api-reference/workflows/pause) instead, paused workflows can be resumed and pick up where they left off.

## Behavior

* In-flight calls are not interrupted; only future steps are cancelled.
* Call logs and per-lead history remain queryable in [List Call Logs](/docs/api-reference/call-logs/list).
* The workflow record is retained, use [Delete Workflow](/docs/api-reference/workflows/delete) if you want to remove it entirely.

## Path parameters

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

## Errors

* `404 Not Found` is returned when the workflow does not exist.
* `409 Conflict` is returned when the workflow is already in a terminal state.

## Related endpoints

* [Pause Workflow](/docs/api-reference/workflows/pause): temporary stop with the option to resume.
* [Delete Workflow](/docs/api-reference/workflows/delete): remove the workflow entirely after cancellation.
* [Duplicate Workflow](/docs/api-reference/workflows/duplicate): clone a cancelled workflow as the starting point for a new one.


## OpenAPI

````yaml POST /workflows/{id}/cancel
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}/cancel:
    post:
      tags:
        - Workflows
      summary: Cancel a workflow
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: WorkflowsController_cancelWorkflow
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
      responses:
        '200':
          description: Workflow cancelled successfully
        '400':
          description: Bad Request - Invalid workflow status
        '404':
          description: Workflow not found
      deprecated: true
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````