1.0 KiB
1.0 KiB
POST /vfs/mkdir
Protected. Requires a valid session cookie (credentials: 'include').
Create directory in virtual filesystem
Creates a directory (and any necessary parent directories) in the virtual filesystem for the authenticated user's selected company.
Body (JSON)
| Field | Required | Type | Description |
|---|---|---|---|
path |
yes | string | Directory path to create (e.g. reports/2026/q1) |
{
"path": "…"
}
Signals
On success, emits SSE signal: vfs (see GET /events).
Response 200
Directory created successfully
{
"success": true,
"dir": "…"
}
Errors
| Status | Description |
|---|---|
| 400 | Path is required, invalid characters, traversal, or no company selected — {"error":"…"} |
| 401 | Unauthorized — {"error":"…"} |
| 403 | Not authorized, or cannot create directory inside read-only database paths — {"error":"…"} |
Generated from @openapi JSDoc. Do not edit by hand — run npm run docs:api.