# deleteFolder()

## Syntax

```javascript
deleteFolder(projectId: string, folderPath: string, token?: string)
```

Delete a folder in the project.

## Parameters

<table><thead><tr><th width="144">Name</th><th width="121">Type</th><th width="108">Required</th><th>Description</th></tr></thead><tbody><tr><td>projectId</td><td>string</td><td>Yes</td><td>The project ID.</td></tr><tr><td>folderPath</td><td>string</td><td>Yes</td><td>The path to access the folder that you want to delete. For example, if you want to delete the folder “Profile" in “NewFolder", the path will be like this: "NewFolder/Profile".</td></tr><tr><td>token</td><td>string</td><td>No</td><td>The authentication token response from Eueno API when login. After login, this token was saved in local storage with the name “eueno-token".</td></tr></tbody></table>

## Example

```javascript
import { deleteFolder } from "@eueno/lib-browser";
 
const onDelete = async () => {
   if (!token) return toast.error("Token null!");
   try {
         const projectId = "112";
         const path = "NewFolder/Profile";
         const res = await deleteFolder(projectId, path);
       
     if (res.status === 200) {
       console.log("Delete successfully");
     }
   } catch (error) {
     console.error(error);
   }
 };
```

Response of example:

```javascript
{"msg":"success"}
```
