---
title: "Copy files or folders to a target folder"
method: POST
path: "/dam/folders/{folder_id}/copy-to"
tags: ["DAM: Folders"]
---

# Copy files or folders to a target folder

`POST /dam/folders/{folder_id}/copy-to`

## Request

- Base URL: `https://api.kontainer.com/jsonapi/v2`
- URL: `https://api.kontainer.com/jsonapi/v2/dam/folders/{folder_id}/copy-to`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/kontainer/apis/kontainer-api-documentation/docs/dam/folders/:folder_id/copy-to/post.ts> (a function with typed inputs; its response is checked against the schema)

Copies multiple files and/or folders into the destination folder specified. Process is run synchronously, so response time is potentially long. Only 'file' and 'folder' resources can be copied into a folder.

## Path parameters

- `folder_id` string, required

## Request body

- CopyToFolderRequest
  - `data` object
    - `type` string
    - `relationships` object
      - `sources` object
        - `data` object[]
          - `type` string
          - `id` string
  - `meta` object
    - `file_conflict_resolution` 'skip' | 'overwrite' | 'rename': How to handle file conflicts when copying. 'skip' will skip conflicting files, 'overwrite' will delete the existing file (requires delete permission) and add the copied file, 'rename' will rename the copied file to avoid conflicts (default)

## Response `200`

Copy completed successfully

- CopyToFolderResponse
  - `meta` object
    - `state` string
    - `summary` object
      - `copied_folder_count` integer
      - `copied_file_count` integer
      - `copied_sub_folder_count` integer

## Other responses

- `401`: Unauthorized
- `404`: Folder not found
- `422`: Invalid request

---

[API](https://skmtc.dev/kontainer/apis/kontainer-api-documentation.md) - [All operations](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/llms.txt) - [OpenAPI document](https://skmtc.dev/kontainer/apis/kontainer-api-documentation/revisions/b80a5167e09a?raw)
