# Create a folder

`POST https://app.eraser.io/api/folders`

## Example request

```bash
curl --location 'https://app.eraser.io/api/folders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' \
--data '{
  "name": "Design Docs"
}'
```

An example request with **explicit order and parent**:

```bash
curl --location 'https://app.eraser.io/api/folders' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE' \
--data '{
  "name": "Subfolders",
  "parentFolderId": "xK9mPq2vR",
  "order": 3
}'
```

## Example response

```json
{
  "id": "xK9mPq2vR"
}
```

## Request body

- `teamId` (string) – The team to act on. Required with an organization API token; team tokens can omit it.
- `name` (string) – Folder name
- `parentFolderId` (string | null) – Parent folder ID, or null for root-level
- `order` (integer) – Sort order among siblings. Auto-assigned if omitted.

## Responses

### 200 – The created folder ID

- `id` (string, required) – ID of the created folder

```json
{
  "id": "string"
}
```

### 400 – Invalid request body

### 401 – Missing or invalid bearer token

### 403 – Unauthorized

### 500 – Internal server error
