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

# Delete Folder

Delete a folder and all its contents (documents and subfolders).

> [!WARNING]
>
> Prior to using this API, you must:
>
> * Enable advanced queries option in [the console](https://console.velt.dev/dashboard/config/appconfig)
> * Deploy v4 series of the Velt SDK.

# Endpoint

`POST https://api.velt.dev/v2/organizations/folders/delete`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

**data** `object` *required*

**properties**

**organizationId** `string` *required*

Organization ID

**folderId** `string` *required*

ID of the folder to delete.

## **Example Request**

```JSON theme={null}
{
   "data": {
       "organizationId": "org10",
       "folderId": "folderId2"
   }
}
```

# Response

#### Success Response

```JSON theme={null}
{
   "result": {
       "status": "success",
       "message": "Folder deletion initiated successfully.",
       "data": null
   }
}
```

#### Failure Response

```JSON theme={null}
{
   "error": {
       "code": "not-found",
       "message": "Folder not found."
   }
}
```

```js theme={null}
{
   "result": {
       "status": "success",
       "message": "Folder deletion initiated successfully.",
       "data": null
   }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.