# Delete a folder

`DELETE https://app.eraser.io/api/folders/{folderId}`

## Example request

```bash
curl --location --request DELETE 'https://app.eraser.io/api/folders/xK9mPq2vR' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE'
```

An example request with **recursive** to delete all children:

```bash
curl --location --request DELETE 'https://app.eraser.io/api/folders/xK9mPq2vR?recursive=true' \
--header 'Authorization: Bearer $YOUR-TOKEN-HERE'
```

## Example response

```json
{
  "success": true
}
```

## Path parameters

- `folderId` (string, required)

## Query parameters

- `recursive` (string) – Delete all child folders and archive their workspaces. Defaults to false.
  Allowed values: `true`, `false`

## Responses

### 200 – Delete successful

- `success` (boolean, required)

```json
{
  "success": true
}
```

### 400 – Invalid folder ID

### 401 – Missing or invalid bearer token

### 403 – Unauthorized

### 404 – Folder not found

### 500 – Internal server error
