---
title: "Folders"
description: "Create folders in a workspace library."
---

> Documentation Index
> Fetch the complete documentation index at: https://tarkle.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Folders

| Method and path | Scope | What it does |
| --- | --- | --- |
| `POST /folders` | `files:write` | Create a folder |

```bash
curl -X POST -H "Authorization: Bearer $TARKLE_TOKEN" -H "X-Workspace-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{"name": "Invoices", "parent_id": null}' \
  https://tarkle.com/api/v1/folders
```

`name` is required. `parent_id` is a folder id, or omitted for the root. The answer is `201` with the new folder.

A file and a folder share one namespace, compared ignoring case, so a taken name in that folder is `409 name_taken`. Names cannot be empty, `.` or `..`, contain `/` or control characters, or be longer than 255 bytes (`400 invalid_name`, `400 name_too_long`).

To list, rename, move or delete a folder use [Files](/docs/api/files). Deleting a folder moves it and everything in it to the bin.

Source: https://tarkle.com/docs/api/folders/index.mdx
