# /api/folder/update

**`POST`**  Update the specified folder.

| Parameter      | Description                                                   |
| -------------- | ------------------------------------------------------------- |
| folderId       | The folder's ID                                               |
| newName        | The new name of the folder                                    |
| newDescription | The new description of the folder                             |
| newColor       | "red","orange","green","yellow","aqua","blue","purple","pink" |

**Sample Code:**

```javascript
var data = {
    "folderId": "KMUFMKTBHINM4",
    "newName": "New Name",
    "newDescription": "New Description",
    "newColor": "red"
};

var requestOptions = {
  method: 'POST',
  body: JSON.stringify(data),
  redirect: 'follow'
};

fetch("http://localhost:41595/api/folder/update", requestOptions)
  .then(response => response.json())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

**Results Returned:**

```javascript
{
    "status": "success",
    "data": {
        "id": "KMUFMKTBHINM4",
        "name": "New Name",
        "description": "New Description",
        "images": [],
        "folders": [],
        "modificationTime": 1592409993367,
        "imagesMappings": {},
        "tags": [],
        "children": [],
        "isExpand": true,
        "size": 30,
        "vstype": "folder",
        "styles": {
            "depth": 0,
            "first": false,
            "last": false
        },
        "isVisible": true,
        "$$hashKey": "object:765",
        "editable": false,
    }
}
```


---

# 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://api.eagle.cool/folder/update.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.
