---
title: "Duplicate Document"
method: POST
path: "/v1/document/duplicate"
tags: ["Document"]
---

# Duplicate Document

`POST /v1/document/duplicate`

Duplicate an existing document, optionally into a different hub

## Request body

- DuplicateDocument
  - `context` BaseRequestContext
    - `projectId` string, uuid
    - `processPublicId` string, uuid, nullable
    - `processSectionPublicId` string, uuid, nullable
    - `processResponsePublicId` string, uuid, nullable
  - `projectId` string, uuid, nullable
  - `processId` string, uuid, required

## Response `200`

Successfully duplicated the document

- object
  - `metadata` object
  - `data` MortaDocument
    - `publicId` string, uuid
    - `description` unknown
    - `logo` string
    - `name` string
    - `type` string
    - `createdAt` string, date-time
    - `updatedAt` string, date-time
    - `isDeleted` boolean
    - `deletedAt` string, date-time, nullable
    - `children` DocumentSection1[]
      - `publicId` string, uuid
      - `parentId` string, uuid
      - `position` integer
      - `description` Draftjs
        - `content` DraftjsContent, required
          - `blocks` DraftjsBlock[], required
            - `data` object, required
            - `depth` integer, required
            - `entityRanges` DraftjsEntityRange[], required
              - …
            - `inlineStyleRanges` DraftjsInlineStyleRange[], required
              - …
            - `key` string, required
            - `text` string, required
            - `type` string, required
          - `entityMap` object, required
      - `name` string
      - `isDeleted` boolean
      - `deletedAt` string, date-time, nullable
      - `pdfIncludeDescription` boolean
      - `pdfIncludeSection` boolean
      - `pageBreakBefore` boolean
      - `children` DocumentSection1[]
      - `responses` DocumentResponse[]
        - `publicId` string, uuid
        - `position` integer
        - `response` unknown
        - `responseDate` string, date-time
        - `type` string
        - `typeOptions` unknown
        - `isDeleted` boolean
        - `deletedAt` string, date-time, nullable
        - `createdAt` string, date-time
        - `updatedAt` string, date-time
        - `user` SummaryUser
          - `firebaseUserId` string
          - `publicId` string, uuid
          - `name` string
          - `email` string
          - `profilePicture` string
        - `pdfIncludeResponse` boolean
        - `resetAfterResponse` boolean
        - `enableSubmission` boolean
      - `openCommentThreads` integer
      - `createdAt` string, date-time, nullable
    - `variables` string[]
    - `variableValues` string[]
    - `expandByDefault` boolean
    - `allowComments` boolean
    - `isTemplate` boolean
    - `lockedTemplate` boolean
    - `projectPublicId` string, uuid
    - `projectName` string

## Other responses

- `403` — Not authorized to duplicate this document
- `404` — Document or target hub not found

---

[API](https://skmtc.net/morta-technology/apis/morta-api-reference.md) · [All operations](https://skmtc.net/morta-technology/apis/morta-api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/morta-technology/morta-api-reference/versions/9c58c1c1e7e8/schema)
