CopyHero

Library read_folders

GET
/api/v1/library/folders

The organization's Product Library folders in tree order as flat rows: from the root folders, or from below parent_id, depth counted from there. Each row carries the path from the root joined by " / ", the number of products directly in the folder and whether it has subfolders. q filters on name and path, case-insensitive. Pages of limit rows; pass next_cursor as cursor for the next page.

Authorization

HTTPBearer
headerAuthorizationBearer <token>

Query Parameters

parent_id?string

Start below this folder; without it the list starts at the root folders.

Formatuuid
max_depth?integer

Levels below the start, at least 1; 1 lists only the direct children. Without it the whole subtree.

Formatint64
q?string

Case-insensitive search in name and path, at most 200 characters.

limit?integer

Rows per page, 1 to 500, default 100.

Formatint64
cursor?string

next_cursor of the previous page.

Response Body

One page of folders and the cursor of the next page, null on the last page.

application/json
  1. response
folders*array<>
next_cursor*string|null
Example Request
curl -X GET 'https://app.copyhero.app/api/v1/library/folders'
Example Response
{  "folders": [    {      "depth": 0,      "has_children": true,      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",      "name": "string",      "parent_id": "1c6ca187-e61f-4301-8dcb-0e9749e89eef",      "path": "string",      "position": 0,      "product_count": 0    }  ],  "next_cursor": "string"}