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

# Duplicate workflow

> Copies a workflow under the name you give. The copy gets its own copies of the messages, prompts, playbooks and Operator agents its steps use, while block and step IDs stay the same.



## OpenAPI

````yaml /specs-prettified/realtime/openapi.stable.json post /v1/stable/workflow/{workflowID}/duplicate
openapi: 3.0.0
info:
  title: Realtime
  description: Realtime gateway API service
  version: 1.0.0
  contact: {}
servers:
  - url: https://realtime-api.voiceflow.com
security: []
tags: []
paths:
  /v1/stable/workflow/{workflowID}/duplicate:
    post:
      tags:
        - Workflow
      summary: Duplicate workflow
      description: Copies a workflow under the name you give. The copy gets its own
        copies of the messages, prompts, playbooks and Operator agents its steps
        use, while block and step IDs stay the same.
      operationId: StableWorkflowController_duplicate
      parameters:
        - name: workflowID
          required: true
          in: path
          schema:
            type: string
          x-vf-doc:
            description: The ID of the workflow to copy.
          description: The ID of the workflow to copy.
        - name: projectID
          required: true
          in: query
          schema:
            type: string
            description: The ID of the project to operate on.
        - name: environmentAlias
          required: true
          in: query
          schema:
            type: string
            description: The alias of the environment to operate on (e.g. `main`).
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/StableWorkflowDuplicateRequest"
      responses:
        "201":
          description: Returns a message, the new workflow's ID and name, and maps from
            each original message, prompt, playbook and Operator agent ID to the
            ID of its copy.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/StableWorkflowDuplicateResponse"
          x-vf-doc:
            description: Returns a message, the new workflow's ID and name, and maps from
              each original message, prompt, playbook and Operator agent ID to
              the ID of its copy.
      security:
        - token: []
components:
  schemas:
    StableWorkflowDuplicateRequest:
      type: object
      properties:
        name:
          type: string
          minLength: 1
          maxLength: 255
          description: The name of the copy.
      required:
        - name
      additionalProperties: false
    StableWorkflowDuplicateResponse:
      type: object
      properties:
        message:
          type: string
        workflow:
          type: object
          properties:
            id:
              type: string
            name:
              type: string
          required:
            - id
            - name
          description: The copy.
        ids:
          type: object
          properties:
            messages:
              type: object
              additionalProperties:
                type: string
              description: Each message the original's steps say, mapped to its copy.
            prompts:
              type: object
              additionalProperties:
                type: string
              description: Each prompt the original's steps and their messages use, mapped to
                its copy.
            playbooks:
              type: object
              additionalProperties:
                type: string
              description: Each playbook a Playbook or Crew step runs, mapped to its copy. The
                copy attaches the same tools.
            operatorAgents:
              type: object
              additionalProperties:
                type: string
              description: Each agent an Operator step runs, mapped to its copy.
          required:
            - messages
            - prompts
            - playbooks
            - operatorAgents
          description: The original ID of each copied resource, mapped to the ID of its
            copy. Block and step IDs do not change.
      required:
        - message
        - workflow
        - ids
  securitySchemes:
    token:
      scheme: bearer
      bearerFormat: JWT
      type: http
      description: Voiceflow bearer token
````
