---
title: "Arranging designs | Customer&#x27;s Canvas Hub"
canonical: "https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/arranging-designs/"
---

# Arranging designs

> If you need different product categories, you can organize your designs into folders with the names of these categories. For example, you may have the following folder structure:

```txt
/Commercial Printing
   /Business Cards
   /Letter-size Flyer
   /Tabloid-size Poster
   ...
```

## Creating folders

The endpoint [`POST /api/storage/v1/designs/folders`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/CreateFolder) creates a single folder in the **Designs** asset section. To create a new folder **/Commercial Printing/Business Cards**, you need to make two requests:

1. Create **Commercial Printing** in the root folder with the following request body.

    ```json
    {
      "name": "Commercial Printing",
      "path": "/"
    }
    ```

2. Create **Business Cards** in **Commercial Printing** with the following request body.

    ```json
    {
      "name": "Business Cards",
      "path": "Commercial Printing"
    }
    ```

**cURL**

```bash
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/folders" \
-H  "accept: application/json" \
-H  "Authorization: Bearer <TOKEN>" \
-H  "Content-Type: application/json" \
-d  "{\"name\":\"Commercial Printing\",\"path\":\"/\"}"
```

**HTTP**

```bash
POST https://api.customerscanvashub.com/api/storage/v1/designs/folders
{
  "name": "Commercial Printing",
  "path": "/"
}
```

**C#**

```cs
var tenantId = 12345; // Put your tenant ID here
// Put design settings here
var body = "{\"name\":\"Commercial Printing\",\"path\":\"/\"}";
var folder = await designsApiClient.CreateFolderAsync(tenantId, body);
```

**TS**

```ts
var tenantId = 12345; // Put your tenant ID here
// Put design settings here
var body = "{\"name\":\"Commercial Printing\",\"path\":\"/\"}";
var folder = _designsApiClient.createFolder(tenantId, body);
```

**PHP**

```php
$tenantId = 12345; // Put your tenant ID here
// Put design settings here
$body = "{\"name\":\"Commercial Printing\",\"path\":\"/\"}";
$fodler = $designsApiClient->designsCreateFolder($tenantId, $body);
```

To get the list of all folders in the **Designs** asset section, use the endpoint [`GET /api/storage/v1/designs/folders/all`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/GetAllFolders). To retrieve the list of subfolders with their content, make a request to [`GET /api/storage/v1/designs/folders/content-by-path`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/GetFolder). The endpoint [`POST /api/storage/v1/designs/{id}`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/Copy) duplicates designs and folders.

## Batch operations

The Asset Storage API allows you to perform batch operations on assets and folders:

- [`POST /api/storage/v1/designs/batch-copy`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/BatchCopy)
- [`POST /api/storage/v1/designs/batch-delete`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/BatchDelete)

When copying, you can assign new names to assets and folders. New elements will keep the metadata, however, they will get new IDs. Since original items stay intact, you need to perform deletion after copying to implement the _move_ function.

The endpoint [`POST /api/storage/v1/designs/batch-copy`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/BatchCopy) takes the following object in the request body.

```json
{
  "entityIds": [
    "61790db31079e200f24ff92c", "652686bb3507abfadd354e83"
  ],
  "folderIds": [
    "6649a16e396239641d1b91dc"
  ],
  "conflictStrategy": "Abort",
  "path": "Cards"
}
```

To pass the folder identifiers, you can get them by getting the entire folder list with [`GET /api/storage/v1/designs/folders/all`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/GetAllFolders) or by path with [`GET /api/storage/v1/designs/folders/content-by-path`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/GetFolder). The folder specified in the `path` must exist.

**cURL**

```bash
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/batch-copy" \
-H  "accept: */*" \
-H  "Authorization: Bearer <TOKEN>" \
-H  "Content-Type: application/json" \
-d  "{\"entityIds\":[\"61790db31079e200f24ff92c\",\"652686bb3507abfadd354e83\"],\"folderIds\":[\"6649a16e396239641d1b91dc\"],\"conflictStrategy\":\"Abort\",\"path\":\"Cards\"}"
```

**HTTP**

```bash
POST https://api.customerscanvashub.com/api/storage/v1/designs/batch-copy
{
  "entityIds": [
    "61790db31079e200f24ff92c", "652686bb3507abfadd354e83"
  ],
  "folderIds": [
    "6649a16e396239641d1b91dc"
  ],
  "conflictStrategy": "Abort",
  "path": "Cards"
}
```

**C#**

```cs
var tenantId = 12345; // Put your tenant ID here
// Put batch-copy settings here
var body = "{\"entityIds\":[\"61790db31079e200f24ff92c\",\"652686bb3507abfadd354e83\"],\"folderIds\":[\"6649a16e396239641d1b91dc\"],\"conflictStrategy\":\"Abort\",\"path\":\"Cards\"}";
var folder = await designsApiClient.BatchCopyAsync(tenantId, body);
```

**TS**

```ts
var tenantId = 12345; // Put your tenant ID here
// Put batch-copy settings here
var body = "{\"entityIds\":[\"61790db31079e200f24ff92c\",\"652686bb3507abfadd354e83\"],\"folderIds\":[\"6649a16e396239641d1b91dc\"],\"conflictStrategy\":\"Abort\",\"path\":\"Cards\"}";
var folder = _designsApiClient.batchCopy(tenantId, body);
```

**PHP**

```php
$tenantId = 12345; // Put your tenant ID here
// Put batch-copy settings here
$body = "{\"entityIds\":[\"61790db31079e200f24ff92c\",\"652686bb3507abfadd354e83\"],\"folderIds\":[\"6649a16e396239641d1b91dc\"],\"conflictStrategy\":\"Abort\",\"path\":\"Cards\"}";
$fodler = $designsApiClient->designsBatchCopy($tenantId, $body);
```

The endpoint [`POST /api/storage/v1/designs/batch-delete`](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md#tag/designs/BatchDelete) also allows you to delete several assets and folders at once. In the request body, pass an object like this:

```json
{
  "entityIds": [
    "6649c593396239641d1b920f", "6649c593396239641d1b9210"
  ],
  "folderIds": [
    "6649a0b1396239641d1b91db", "6649c592396239641d1b920e"
  ]
}
```

**cURL**

```bash
curl -X \
POST "https://api.customerscanvashub.com/api/storage/v1/designs/batch-delete" \
-H  "accept: */*" \
-H  "Authorization: Bearer <TOKEN>" \
-H  "Content-Type: application/json" \
-d  "{\"entityIds\":[\"6649c593396239641d1b920f\",\"6649c593396239641d1b9210\"],\"folderIds\":[\"6649a0b1396239641d1b91db\",\"6649c592396239641d1b920e\"]}"
```

**HTTP**

```bash
POST https://api.customerscanvashub.com/api/storage/v1/designs/batch-delete
{
  "entityIds": [
    "6649c593396239641d1b920f", "6649c593396239641d1b9210"
  ],
  "folderIds": [
    "6649a0b1396239641d1b91db", "6649c592396239641d1b920e"
  ]
}
```

**C#**

```cs
var tenantId = 12345; // Put your tenant ID here
// Put batch-delete settings here
var body = "{\"entityIds\":[\"6649c593396239641d1b920f\",\"6649c593396239641d1b9210\"],\"folderIds\":[\"6649a0b1396239641d1b91db\",\"6649c592396239641d1b920e\"]}";
var folder = await designsApiClient.BatchDeleteAsync(tenantId, body);
```

**TS**

```ts
var tenantId = 12345; // Put your tenant ID here
// Put batch-delete settings here
var body = "{\"entityIds\":[\"6649c593396239641d1b920f\",\"6649c593396239641d1b9210\"],\"folderIds\":[\"6649a0b1396239641d1b91db\",\"6649c592396239641d1b920e\"]}";
var folder = _designsApiClient.batchDelete(tenantId, body);
```

**PHP**

```php
$tenantId = 12345; // Put your tenant ID here
// Put batch-delete settings here
$body = "{\"entityIds\":[\"6649c593396239641d1b920f\",\"6649c593396239641d1b9210\"],\"folderIds\":[\"6649a0b1396239641d1b91db\",\"6649c592396239641d1b920e\"]}";
$fodler = $designsApiClient->designsBatchDelete($tenantId, $body);
```

## Conflict resolving strategy

When copying files and folders, there may be situations when there is an item with the same name in the destination folder. This results in an error. To resolve such errors automatically, a conflict resolving strategy was introduced. In the request parameters, you have already used the `conflictStrategy` with the `Abort` value, which aborts the request if the desired item name exists in the assets.

The following actions are available:

- `Abort` — the operation is canceled.
- `Overwrite` — the existing file or folder is deleted, and a new one takes its place.
- `Rename` — the existing file remains unchanged, and a unique name is generated for the new one.
- `Skip` — the operation is skipped for the existing file.

***

**Further Reading**

- Learn how to [get a design list](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/getting-design-list.md) using this API.
- Explore how to [configure retention policy](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage/retention-policy.md) of assets.
- Dive into [Asset Storage API](https://customerscanvas.com/docs/hub/dev-center/api/asset-storage.md) reference.
