Skip to navigation

Delete Folder

View as Markdown

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:

Authorization: Bearer {{access_token}}

Headers

HeaderValue
AuthorizationBearer {{access_token}}

Path Parameters

ParameterTypeRequiredDescription
folder_idintegerYesID of the folder to delete

Example endpoint:

{{base_url}}/folders/{{folder_id}}

Required Variables

VariableRequiredDescription
base_urlYesBase API URL
access_tokenYesAuthentication access token
folder_idYesFolder ID to delete

Sample Request

curl --request DELETE "{{base_url}}/folders/{{folder_id}}" \
--header "Authorization: Bearer {{access_token}}"

Sample Success Response

A successful request typically returns HTTP 200 OK.

{
"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
messagestring
successboolean