---
title: "Clone View"
method: POST
path: "/folder/views/clone"
tags: ["Folder"]
---

# Clone View

`POST /folder/views/clone`

## Request

- Base URL: `https://api.speakai.co/v1`
- URL: `https://api.speakai.co/v1/folder/views/clone`
- Auth: API key in header `x-speakai-key` and API key in header `x-access-token`

Clone a view from source folder to target folder. Use 'Get All Views' to get available view IDs for cloning.

**Request rules.** `targetFolderId` must differ from `sourceFolderId`. Sending the same id for both is rejected.

## Request body

- object
  - `sourceFolderId` string, required: The ID of the folder that holds the view you want to copy. Required.
  - `targetFolderId` string, required: The ID of the folder you want the copied view added to. It must be a different folder from sourceFolderId. Required. Rejected when it equals sourceFolderId,. invalid(the schema). The error message is "Source and target folder IDs cannot be the same".
  - `viewId` string, required: The ID of the view inside the source folder that you want to copy. It must belong to an active view, otherwise the request returns 404. Required.
  - `name` string, required: The name for the copied view in the target folder. Required.
  - `isDefault` boolean: Whether the copied view becomes the default view for the target folder. Setting it to true clears the default flag on your other active views in that folder. Optional. The schema declares a default of false, but the middleware discards the schema's converted value, so an omitted isDefault reaches the handler as undefined. The stored value still ends up false, because the FolderView model defaults isDefault to false.

## Response `200`

Success. This spec records no example response body for this endpoint.

---

[API](https://skmtc.dev/speakai/apis/speak-ai-api.md) · [All operations](https://skmtc.dev/speakai/apis/speak-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/speakai/apis/speak-ai-api/revisions/52d777e6d46e?raw)
