# deleteProject()

## Syntax

```javascript
deleteProject(projectId: string, token?: string)
```

Delete the project by project ID.

## Parameters

<table><thead><tr><th width="116">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>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>

## Returns

Promise returns an object with two properties is:

* “folders” - \[ ]: array of folders name
* “files” - \[ ]: array of objects, each object includes file information

## Example

```javascript
import { deleteBucket } from "@eueno/lib-browser";

const onDelete = async () => {
   if (!token || !projectId) return;
   try {
     const res = await deleteProject(projectId);
     if (res?.status === 200) {
       console.log("Delete successfully");
     }
   } catch (error) {
     console.error(error);
   }
};

```

Response of example:

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.eueno.io/eueno-libraries/eueno-lib-browser/deleteproject.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
