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

# Duplicate Workflow

> Create an exact copy of a workflow in draft status so you can edit safely without touching the live original.

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

Creates a complete copy of a workflow, every node, every edge, every per-node configuration, in `draft` status. The duplicate is independent from the original: changes you make to it do not affect the live workflow, and leads enrolled in the original are not carried over to the duplicate. The duplicate keeps the original's name with a `(Copy)` suffix by default. Rename it with [Update Workflow](/docs/api-reference/workflows/update) before activating.

## When to use this

* **Safe iteration**: duplicate a working workflow, edit the copy, A/B test the change, then promote the copy when it outperforms the original.
* **Variant per campaign**: start from a proven workflow structure for a new outreach with different prompts, agents, or wait times.
* **Backup before risky edits**: duplicate before a major structural change so you can fall back to the snapshot if needed.
* **Cross-team reuse**: share a known-good workflow design between teams without exposing the original.

A duplicate does not include lead enrollments. After the copy is created, enroll the leads you want to test through [Upload Workflow Leads](/docs/api-reference/v1/workflow-leads/add). When the copy is ready, [Activate Workflow](/docs/api-reference/workflows/activate) to go live.

## What gets copied

* All nodes (with their `node_type`, `label`, `config`, and `position_x`/`position_y`).
* All edges (with their `from_node_id`, `to_node_id`, and `label`).
* Workflow metadata such as `name` and `description`.

What does **not** get copied:

* Enrolled leads.
* Historical call logs.
* The original workflow's `status`: the duplicate always starts as `draft`.

## Path parameters

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

## Errors

* `404 Not Found` is returned when the source workflow does not exist.

## Related endpoints

* [Update Workflow](/docs/api-reference/workflows/update): rename the duplicate.
* [Activate Workflow](/docs/api-reference/workflows/activate): promote the duplicate to active.
* [Upload Workflow Leads](/docs/api-reference/v1/workflow-leads/add): enroll leads in the duplicate.
* [Delete Workflow](/docs/api-reference/workflows/delete): discard an unused duplicate.


## OpenAPI

````yaml POST /workflows/{id}/duplicate
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}/duplicate:
    post:
      tags:
        - Workflows
      summary: Duplicate a workflow by ID
      description: >-
        **Legacy endpoint - deprecated, scheduled for removal on July 31,
        2026.** Use the `/v1` version for new integrations. 
      operationId: WorkflowsController_duplicate
      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:
        '201':
          description: Workflow duplicated successfully
        '404':
          description: Workflow not found
        '500':
          description: Internal Server Error
      deprecated: true
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````