> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velt.dev/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).
</Tip>

# Endpoint

`https://api.velt.dev/v1/organizations/folders/access/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="folderIds" type="string[]" required>
      Array of Folder IDs
    </ParamField>

    <ParamField body="accessType" type="string" default="public" required>
      Access type for the folders. Allowed values: `organizationPrivate`, `restricted`, `public`.
      [Learn more](/key-concepts/overview#access-control).
    </ParamField>
  </Expandable>
</ParamField>

## **Example Requests**

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

# 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."
      }
    }
  }
}
```

#### Failure Response

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

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