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

# DuplicateItem

> Make a copy of a document (including a task) or an AI chat, owned by the user, as the Duplicate action in the app does.

# DuplicateItem

Make a copy of a document (including a task) or an AI chat, owned by the user, as the Duplicate action in the app does. Requires view access to the original. Returns the copy's id.

## Parameters

| Parameter | Type | Required | Description |
| - | - | - | - |
| `entityType` | `"document"` \| `"chat"` | Yes | The kind of item to duplicate. |
| `entityId` | string | Yes | The id of the item to duplicate. |
| `name` | string | No | Name for the copy of a document. Omit to use "\<original name> copy". AI chat copies always keep the original name. |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.