| Time | Status | User Agent |  |
| :-- | :-- | :-- | :-- |
| Make a request to see history. |

#### URL Expired
The URL for this request expired after 30 days.

## How Permissions Work
Folder permissions control what actions clients can perform on files:

- **read\_write**: Clients can view, create, and delete files
- **read\_only**: Clients can only view files; they cannot create or delete files

### Permission Inheritance
Permissions are inherited hierarchically:

1. **New folders**: When created, folders inherit permissions from their parent folder (or root if created at the top level)
2. **Files**: Files inherit permissions from their parent folder.
3. **No cascades**: Modifying a folder's client permissions via the API only modifies permissions on the folder in the query, not any of its children. Each folder's permissions must be modified individually.

## Update Folder Permissions
Updates the client permissions for a specific folder.

### Endpoint
```undefined
PUT https://api.assembly.com/v1/files/{id}/permissions
```

### Example Request
```shell
curl --request PUT \
  --url https://api.assembly.com/v1/files/abc123-folder-id/permissions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '{
    "clientPermissions": "read_only"
  }'
```

## Update Root Folder Permissions
Updates the client permissions for the root level of a file channel. The root level contains folder and files that are not inside any folder.

### Endpoint
```undefined
PUT https://api.assembly.com/v1/files/root/permissions
```

### Example Request
```shell
curl --request PUT \
  --url https://api.assembly.com/v1/files/root/permissions \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: YOUR_API_KEY' \
  --data '{
    "channelId": "xyz789-channel-id",
    "clientPermissions": "read_only"
  }'
```

### Parameters
- **id** (string, required): The id of the folder to update or the string 'root' for the root folder
- **clientPermissions** (string, required): The permission level for clients. Must be either `read_write` or `read_only`
- **channelId** (string): The id for the file channel. Required for updating root folder permissions.

### Responses
- ```200```: Success
- ```400```: Bad Request
- ```401```: Unauthorized
- ```403```: Forbidden
- ```404```: Not Found

```shell
curl --request PUT \
     --url https://api.assembly.com/v1/files/id/permissions/ \
     --header 'content-type: application/json'
```

Click `Try It!` to start a request and see the response here!
