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

# Delete Folder

> Delete a folder

## Path Parameters

<ParamField path="organizationId" type="string" required>
  Organization ID
</ParamField>

<ParamField path="projectId" type="string" required>
  Project ID
</ParamField>

<ParamField path="id" type="string" required>
  Folder ID
</ParamField>

## Response

Returns an empty response on success.

<Warning>
  Folders containing saved searches or child folders cannot be deleted. Move or delete all items first.
</Warning>

## Error Responses

### Folder Not Found

```json theme={null}
{
  "error": {
    "code": "NOT_FOUND",
    "message": "Folder not found"
  }
}
```

### Folder Not Empty

```json theme={null}
{
  "error": {
    "code": "FOLDER_NOT_EMPTY",
    "message": "Cannot delete folder that contains items. Please move or delete the contents first."
  }
}
```

## Code Examples

<CodeGroup>
  ```bash cURL theme={null}
  curl -X DELETE "https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123" \
    -H "Authorization: Bearer YOUR_JWT"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.metabind.ai/app/v1/organizations/org123/projects/proj456/folders/folder123',
    {
      method: 'DELETE',
      headers: {
        'Authorization': 'Bearer YOUR_JWT'
      }
    }
  );

  if (response.ok) {
    console.log('Folder deleted successfully');
  }
  ```
</CodeGroup>
