Folders are the organizational layer between workspaces and documents in Caret. They can be nested arbitrarily deep using theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/arrozet/caret/llms.txt
Use this file to discover all available pages before exploring further.
parent_folder_id field — a folder with parent_folder_id: null sits at the workspace root, while child folders reference a parent by UUID. This structure lets you model complex information hierarchies (teams, projects, epics, sprints) without any depth limit. The Folders API exposes endpoints for creating, listing, reordering, renaming, reparenting, and soft-deleting folders. All endpoints require a valid Supabase JWT passed as a Bearer token.
All endpoints are routed through the API Gateway. The gateway forwards
/api/v1/folders* traffic to the internal document-service. Always target https://api.caret.page/api/v1/... from client code.POST /api/v1/folders
Create a new folder inside a workspace. The folder is placed at the workspace root by default. Pass a parent_folder_id to nest it inside an existing folder. Optionally provide a sort_order value to control the folder’s position among its siblings.
Request body
UUID of the workspace to create the folder in. The caller must be a member of this workspace.
Display name for the folder. Shown in the sidebar tree.
UUID of the parent folder. Pass
null or omit to create the folder at the workspace root.Optional numeric sort order for manual ordering among sibling folders. Folders without a
sort_order are ordered by created_at by default.201 Created
UUID of the newly created folder.
UUID of the workspace this folder belongs to.
UUID of the parent folder, or
null if the folder is at the workspace root.Display name of the folder.
Manual sort order, or
null if not explicitly set.UUID of the user who created the folder.
ISO 8601 timestamp of when the folder was created.
ISO 8601 timestamp of the last update to the folder record.
GET /api/v1/folders
List folders in a workspace, optionally scoped to a specific parent folder. Use this endpoint to fetch the immediate children of a given folder when lazily building out a tree UI. Pass only workspace_id to retrieve all root-level folders (those with parent_folder_id: null), or also pass parent_folder_id to retrieve the children of a specific folder.
Query parameters
UUID of the workspace to list folders from.
Optional UUID of the parent folder to scope results to. When omitted, returns folders at the workspace root (those with
parent_folder_id: null).Maximum number of folders to return. Omit for unpaginated results.
Number of folders to skip before returning results. Used together with
limit for cursor-style pagination.200 OK — array of FolderResponseDto
Returns an array of folder objects. Each object has the same shape as the response documented in POST /api/v1/folders above.
GET /api/v1/folders/all
Fetch all folders across the entire workspace as a single flat array, regardless of nesting depth. This is the preferred endpoint for building a full sidebar folder tree in one round-trip — load all folders at once, then construct the tree client-side by grouping on parent_folder_id. This avoids the recursive requests that GET /api/v1/folders with per-level scoping would require.
Query parameters
UUID of the workspace to list all folders from.
Maximum number of folders to return. Omit for unpaginated results.
Number of folders to skip before returning results. Used together with
limit for cursor-style pagination.200 OK — array of FolderResponseDto
Returns a flat array of all folder objects in the workspace, at all nesting levels. Use parent_folder_id to reconstruct the tree client-side.
PATCH /api/v1/folders/{id}
Update a folder’s name, parent, or sort order. All fields are optional — only fields you include will be modified. Use this endpoint to rename a folder, move it to a different parent (or to the workspace root), or reposition it among siblings.
The gateway spec uses
PATCH for this operation (partial update semantics). Sending parent_folder_id: null explicitly moves the folder to the workspace root. Omitting parent_folder_id entirely leaves the current parent unchanged.UUID of the folder to update.
New display name for the folder.
Move the folder to a different parent. Pass a folder UUID to nest under another folder, or
null to move to the workspace root.Update the manual sort order. Pass
null to clear the sort order and revert to default created_at ordering.200 OK — FolderResponseDto
Returns the full updated folder object.
DELETE /api/v1/folders/{id}
Soft-delete a folder. The folder is marked with a deleted_at timestamp and will no longer appear in any list or get responses. Nested child folders and documents within the folder are also implicitly inaccessible after the parent is deleted. Only workspace owners or the folder creator can perform this operation.
Path parameters
UUID of the folder to delete.
204 No Content
No response body is returned on successful deletion.