> ## 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.

# Update Folder

Use this API to:

1. update metadata of a folder within an organization.
2. move a folder and its contents to a different parent folder.

<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.
</Warning>

# Endpoint

`POST https://api.velt.dev/v1/organizations/folders/update`

# Headers

<ParamField header="x-velt-api-key" type="string" required>
  Your API key.
</ParamField>

<ParamField header="x-velt-auth-token" type="string" required>
  Your [Auth Token](/security/auth-tokens).
</ParamField>

# Body

#### Params

<ParamField body="data" type="object" required>
  <Expandable title="properties">
    <ParamField body="organizationId" type="string" required>
      Organization ID
    </ParamField>

    <ParamField body="folders" type="Folders[]" required>
      <Expandable title="properties">
        <ParamField body="folderId" type="string" required>
          Unique identifier for the new folder
        </ParamField>

        <ParamField body="folderName" type="string">
          Name of the folder
        </ParamField>

        <ParamField body="parentFolderId" type="string">
          ID of the parent folder
        </ParamField>
      </Expandable>
    </ParamField>
  </Expandable>
</ParamField>

## **Example Request**

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "folders": [
        {
          "folderId": "yourFolderId", 
          "folderName": "yourFolderName",
          "parentFolderId": "yourParentFolderId"
        }
    ]
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
   "result": {
       "status": "success",
       "message": "Folder Updated successfully.",
       "data": {
           "yourFolderId": {
               "success": true,
               "id": "yourFolderId",
               "message": "Folder Updated."
           }
       }
   }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

<ResponseExample>
  ```js theme={null}
  {
     "result": {
         "status": "success",
         "message": "Folder Updated successfully.",
         "data": {
             "yourFolderId": {
                 "success": true,
                 "id": "yourFolderId",
                 "message": "Folder Updated."
             }
         }
     }
  }
  ```
</ResponseExample>
