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

# Duplicate a Workflow

> Initiate the duplication of an existing workflow

### Headers

<ParamField header="Authorization" type="string" required>
  Your API key for authentication. Prefix with `Bearer `.
</ParamField>

<ParamField header="x-access-token" type="string" required>
  Your access token for authentication.
</ParamField>

### Body

<ParamField body="id" type="string" required>
  The id of the existing workflow to duplicate from.
</ParamField>

<ParamField body="name" type="string" required>
  The name of the duplicated workflow
</ParamField>

<ParamField body="description" type="string" required>
  The description of the duplicated workflow
</ParamField>

### Response

<ResponseField name="responseCode" type="string">
  Confirms the request was successful.
</ResponseField>

<ResponseField name="message" type="string">
  A human-readable message about the request's outcome.
</ResponseField>

<ResponseField name="data" type="object">
  An object containing the details of the updated workflow.
</ResponseField>

<ResponseExample>
  ```json Response theme={null}
  {
      "responseCode": 2000,
      "message": "Workflow duplicated successfully",
      "data": {
          "duplicateWorkflow": {
              "id": "f22c43ef-be66-4859-b5b4-**",
              "name": "New Workflow",
              "description": null,
              "user_id": "***",
              "nodes":[],
              "edges":[],
              "ml_payload": [],
              "created_at": "2025-07-29T09:11:00.661Z",
              "updated_at": "2025-07-29T09:30:39.801Z"
          }
      }
  }
  ```
</ResponseExample>
