Returns a list of files and folders belonging to the currently authenticated Clerk user. Pass aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/nayalsaurav/Storx/llms.txt
Use this file to discover all available pages before exploring further.
parentId to browse inside a specific folder, or omit it to retrieve root-level items where parentId IS NULL.
Request
Method:GETPath:
/api/filesAuth: Clerk session cookie required. The
userId query parameter must match the authenticated session’s user ID — mismatches return 401.
Query Parameters
The Clerk user ID of the authenticated user. Must exactly match the session’s
userId; used to scope the database query and prevent cross-user data access.UUID of the parent folder whose direct children you want to list. When
omitted, only root-level items (where
parentId IS NULL) are returned. Must
be a valid UUID referencing an existing folder owned by the user.Response
200 — Success
Returns a JSON object containing afiles array. Each element is a FileItem record.
Array of file and folder records owned by the user. Empty array
[] when no
items exist at the requested level.Error Responses
| Status | Error message | Cause |
|---|---|---|
401 | "unauthorized" | No active Clerk session, userId param is missing, or it doesn’t match the session user. |
500 | "error fetching files" | Unexpected database error while querying the files table. |