---
title: "Replace the permission matrix"
method: PUT
path: "/rooms/{id}/permissions"
tags: ["Rooms"]
---

# Replace the permission matrix

`PUT /rooms/{id}/permissions`

## Request

- Base URL: `https://dataroom.corgi.com/api/v1`
- URL: `https://dataroom.corgi.com/api/v1/rooms/{id}/permissions`
- Auth: HTTP bearer

Full-replace the who-sees-what rows for exactly one grant (`linkId` XOR `groupId`). Idempotent; `rows: []` clears. Scope: `datarooms:permissions`.

## Path parameters

- `id` string, required

## Request body

- object
  - `linkId` string
  - `groupId` string
  - `rows` object[], required
    - `folderId` string, nullable, required
    - `fileId` string, nullable, required
    - `visible` boolean, required
    - `downloadable` boolean, required
    - `watermark` boolean, required
    - `nda` boolean, required
    - `agreementId` string

## Response `200`

Saved (`{ rowCount }`)

## Other responses

- `400`: Not exactly one grant
- `404`: Room/link/group not found

---

[API](https://skmtc.dev/corgi/apis/dataroom-api.md) - [All operations](https://skmtc.dev/corgi/apis/dataroom-api/llms.txt) - [OpenAPI document](https://skmtc.dev/corgi/apis/dataroom-api/revisions/73f75ef04a00?raw)
