Create Folder
POST /api/v1/workspaces/{workspaceId}/storage/folders
{
"created": true,
"folder": { "id": "fold_1", "name": "archive", "path": "/archive" }
}
Rename Folder
PATCH /api/v1/workspaces/{workspaceId}/storage/folders
Browse Path / Tree
GET /api/v1/workspaces/{workspaceId}/storage/path
1 — return just the list of folder paths. full — return the entire tree (folders + files).
tree is an alias for tree=1.
Response shapes
{
"path": "/archive",
"folders": [ { "id": "fold_2", "name": "2026", "path": "/archive/2026" } ],
"files": [ /* StorageFile[] — see Files */ ]
}
{ "paths": ["/", "/archive", "/archive/2026", "/uploads"] }
{
"folders": [ /* all folders */ ],
"files": [ /* all files */ ]
}
curl "https://suite.sundaypyjamas.com/api/v1/workspaces/ws_123/storage/path?folderPath=/archive" \
-H "Authorization: Bearer spj_ai_your_api_key_here"
Errors
| Status | Error |
|---|
| 400 | folderPath is required (Create) / folderPath and newName are required (Rename) |
| 401 | Unauthorized |