---
title: "Makes a folder, with the folders it goes into"
method: PUT
path: "/lambdas/{privateKey}/folders/{path}"
tags: ["Workspace"]
---

# Makes a folder, with the folders it goes into

`PUT /lambdas/{privateKey}/folders/{path}`

## Request

- Base URL: `https://genhttp.dev/api/v1`
- URL: `https://genhttp.dev/api/v1/lambdas/{privateKey}/folders/{path}`
- Auth: none declared

Writing a file makes its folders on its own; this is for a folder that is empty for now. Nothing happens if it is there already.

## Path parameters

- `privateKey` string, required
- `path` string, required

## Response `200`

The workspace afterwards

- WorkspaceListing: What a workspace holds, and how much room it has left.
  - `Files` WorkspaceEntry[]: Every file, in every folder
    - `Path` string: Its path within the workspace, with forward slashes: `logs/today.txt`
    - `Size` integer: How many bytes it holds
    - `Modified` string, date-time: When it was last written
  - `Folders` string[]: Every folder, by its path - listed apart, since a folder may be empty
  - `UsedBytes` integer: The room the files and folders take, counted in blocks of 4 KB as the allowance is
  - `QuotaBytes` integer: The room the workspace may take: the data allowance of the lambda's tier, less what its database takes
  - `Enabled` boolean: Whether the workspace is switched on; while it is off, it holds nothing and nothing can be written

## Other responses

- `204`: A response containing no body
- `400`: A file has that path, there is no room for another folder, or the path cannot be used.
- `403`: The lambda is a demo, which anybody may read and nobody may change. Create a lambda of your own from it instead: `POST /lambdas` with the demo's id as `template`.
- `404`: No lambda has this editor key. A key that never existed and the key of a deleted lambda are answered alike.
- `409`: The workspace is switched off.

---

[API](https://skmtc.dev/genhttp/apis/genhttp-lambda-api.md) · [All operations](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/llms.txt) · [OpenAPI document](https://skmtc.dev/genhttp/apis/genhttp-lambda-api/revisions/8b36699e03df?raw)
