Reads the currentDocumentation 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.
isStarred value of the specified file and atomically flips it (true → false or false → true). The updated FileItem record is returned directly so clients can sync local state without an additional fetch.
Request
Method:PATCHPath:
/api/files/{fileId}/starContent-Type:
application/jsonAuth: Clerk session cookie required. The
userId body field must match the session’s user ID.
Path Parameters
UUID of the file or folder whose star status should be toggled. Must belong to
the authenticated user; otherwise a
404 is returned.Request Body
The Clerk user ID of the authenticated user. Must match the session’s
userId
exactly. Checked before any database operation. The desired star state is
not accepted as a parameter — the endpoint always toggles the current
database value.Response
200 — Success
Returns the full updatedFileItem object with the toggled isStarred value applied. The response is the raw record, not wrapped in a container object.
UUID primary key of the file or folder.
Display name of the file or folder.
ImageKit storage path.
File size in bytes (
0 for folders).MIME type of the file (e.g.
"image/jpeg", "application/pdf").Public ImageKit CDN URL for accessing the file.
ImageKit-generated thumbnail URL. May be
null.Clerk user ID of the file owner.
UUID of the parent folder, or
null if at root.true if the record represents a folder.The toggled star status — this is the new persisted value after the PATCH.
Current trash status, unchanged by this endpoint.
ISO 8601 creation timestamp.
ISO 8601 timestamp of the most recent update.
Error Responses
| Status | Error message | Cause |
|---|---|---|
400 | "File id is required" | The fileId path parameter is missing or empty. |
401 | "Unauthorized" | No active Clerk session, or userId body field doesn’t match the session user. |
404 | "File not found" | No file with that UUID exists for this user. |
500 | "Failed to mark the file as starred" | Unexpected database error during the update. |