/api/user/folders

View all folders or create a new folder.

Info

This endpoint requires authentication.

GET
Request

Query Parameters

NameTypeDescription
noinclbooleanIf true, returned folders will not include the files (eliminates unnecessary fetching of files).

Response

Status: 200 OK

Content-Type: application/json

An array of Folder objects.

POST
Request

Create a new folder.

Body

Content-Type: application/json

PropertyTypeDescription
namestringRequired. Name of the folder.
isPublicboolean?Whether the folder is public (false by default).
filesstring[]?Optional array of file IDs to associate with this folder.

Example

Create a folder that is not public and contains two files:

{
"name": "My Folder",
"files": ["id1", "id2"]
}

Create a folder that is public:

{
"name": "Public Folder",
"isPublic": true
}

Response

Status: 200 OK

Content-Type: application/json

A Folder object representing the created folder.

Error Responses

  • 400 Bad Request

    Missing a folder name or the file ids provided are invalid.



Last updated: 6/1/2025
Edit this page on GitHub