# Set who can see it (/docs/api-reference/set_access_visibility)

`PATCH /v1/access/visibility` · operation `set_access_visibility`

Sets who can see a folder, Room file, File, task or goal: only_me (whoever made it), people (only those added), workspace (my workspace), room (everyone in this Room) or inherit. A folder is room/inherit (open), people or workspace (restricted): Full access only. A File is only_me, people or workspace. For workspace, pass workspace_id when you are in more than one Workspace; it must be one you are in.

**Sign-in:** a signed-in person's access token (`Authorization: Bearer …`), which AI apps get through MCP sign-in; or a Workspace API key in the `X-SMB-API-Key` header.

### Headers

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `SMB-Workspace-Id` | string (uuid) | yes | Workspace where this operation runs. Required for user tokens and Workspace API keys. |

### Request body (JSON)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object_type` | one of `room_folder`, `room_file`, `file`, `task`, `goal` | yes |  |
| `object_id` | string | yes | Its ID: rom_, rfd_, rfl_, fil_, tsk_ or gol_. |
| `visibility` | one of `only_me`, `people`, `workspace`, `room`, `inherit` | yes | Who can see it: only_me, people (only those added), workspace (my workspace), room (everyone in this Room), inherit (follow the folder above or the Room). |
| `workspace_id` | string | no | For workspace: which of your Workspaces. Without it, the request's Workspace if you are in it, else your only one. |

### Response

**200** Successful authorized response.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `object` | object | yes |  |
| `object.type` | one of `room`, `room_folder`, `room_file`, `file`, `task`, `goal` | yes | What to share: a Room, a folder, a Room file, a File, a task or a goal. |
| `object.id` | string | yes |  |
| `object.name` | string | no |  |
| `object.access_level` | one of `view`, `edit`, `full_access` | no |  |
| `visibility` | one of `only_me`, `people`, `workspace`, `room`, `inherit` | yes | Who can see it: only_me, people (only those added), workspace (my workspace), room (everyone in this Room), inherit (follow the folder above or the Room). |
| `access_mode` | one of `inherit`, `restricted` | no |  |
| `can_manage` | boolean | yes | Whether you can change who sees it (grants list only then). |
| `mine` | boolean | no | A File: whether you made it (only its maker picks only_me). |
| `grants` | array of object | yes |  |
| `grants[].subject` | object | yes |  |
| `grants[].access_level` | one of `view`, `edit`, `full_access` | yes |  |
| `grants[].source_type` | string | yes | Where it comes from: given here (api, participant, invite), inherited from a folder above, or room (everyone who can open the Room). |
| `grants[].inherited_from` | object | no |  |
| `grants[].created_at` | string | yes |  |
| `request_id` | string | yes |  |

### Errors

- `400` The request is invalid.
- `401` Authentication is required.
- `403` The caller is not authorized.
- `404` The resource was not found.
- `409` The resource revision or idempotency input conflicts.
- `413` The request body is too large.
- `415` The request must be JSON.
- `422` Required evidence is missing.
- `429` Rate limit reached; honor Retry-After.
- `500` The request could not be completed.
- `502` A dependency returned an invalid response.
- `503` The service is temporarily unavailable.

### Example

```bash
curl --request PATCH "https://api.smb.co/v1/access/visibility" \
  --header "Authorization: Bearer $ACCESS_TOKEN" \
  --header "SMB-Workspace-Id: $WORKSPACE_ID" \
  --header "Content-Type: application/json" \
  --data '{"object_type":"room_folder","object_id":"…","visibility":"only_me"}'
```