> ## 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 Access for Folders

Use this API to update the access type for a single or multiple folders at once.

> [!TIP]
>
> You can update the default access type for all the folders associated with your API Key in [console](https://console.velt.dev/dashboard/config/appconfig).

# Endpoint

`https://api.velt.dev/v2/organizations/folders/access/update`

# 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

#### Params

**data** `object` *required*

**properties**

**organizationId** `string` *required*

Organization ID

**folderIds** `string[]` *required*

Array of Folder IDs

**accessType** `string` *required* (default: public)

Access type for the folders. Allowed values: `organizationPrivate`, `restricted`, `public`.
[Learn more](https://velt.dev/docs/key-concepts/overview.md#access-control).

**inheritFromParent** `boolean`

Configure the folder to inherit access permissions from its parent folder. When set to `true`, the folder automatically inherits all access settings from its parent.

## **Example Requests**

#### 1. Update folder access type

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "folderIds": ["yourFolderId1, yourFolderId2"],
    "accessType": "organizationPrivate"
  }
}
```

#### 2. Configure folder to inherit access from parent

```JSON theme={null}
{
  "data": {
    "organizationId": "yourOrganizationId",
    "folderIds": ["yourFolderId1"],
    "inheritFromParent": true
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Updated access for folders successfully.",
    "data": {
      "yourFolderId": {
        "success": true,
        "accessType": "organizationPrivate",
        "message": "Folder access type updated."
      }
    }
  }
}
```

#### Success Inherit Access From Parent Response

```JSON theme={null}

{
    "result": {
        "status": "success",
        "message": "Folder access type updated.",
        "data": {
            "folder1": {
                "success": true,
                "accessType": null,
                "inheritFromParent": true,
                "message": "Folder access type updated."
            }
        }
    }
}
```

#### Failure Response

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

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Updated access for folders successfully.",
    "data": {
      "yourFolderId": {
        "success": true,
        "accessType": "organizationPrivate",
        "message": "Folder access type updated."
      }
    }
  }
}
```


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