Delete Folder
## Delete Folder
Deletes a folder for the authenticated user.
> ⚠️ Deleting a folder may also affect its **files and subfolders** depending on the system implementation.
**Method:** `DELETE`
**URL:** `{{base_url}}/folders/{{folder_id}}`
---
## Authentication
This endpoint requires authentication.
Use a **Bearer token** in the `Authorization` header:
``` http
Authorization: Bearer {{access_token}}
```
---
## Headers
| Header | Value |
| --- | --- |
| Authorization | Bearer {{access_token}} |
---
## Path Parameters
| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `folder_id` | integer | Yes | ID of the folder to delete |
Example endpoint:
```
{{base_url}}/folders/{{folder_id}}
```
---
## Required Variables
| Variable | Required | Description |
| --- | --- | --- |
| `base_url` | Yes | Base API URL |
| `access_token` | Yes | Authentication access token |
| `folder_id` | Yes | Folder ID to delete |
---
## Sample Request
``` bash
curl --request DELETE "{{base_url}}/folders/{{folder_id}}" \
--header "Authorization: Bearer {{access_token}}"
```
---
## Sample Success Response
A successful request typically returns **HTTP 200 OK**.
``` json
{
"success": true,
"message": "Folder deleted successfully"
}
```
---
## Common Errors
- **400 Bad Request**
- Invalid `folder_id`
- **401 Unauthorized / 403 Forbidden**
- Missing or invalid `Authorization` header
- Expired `{{access_token}}`
- **404 Not Found**
- Folder does not exist
---
## Notes
- Deleting a folder may **also remove or relocate files and subfolders** depending on the system rules.
- System folders like trash, recent etc may not be deletable.
- Ensure the folder is not required by other operations before deleting.
Response
OK
message
success
