---
title: "Make the session private or workspace-visible, and edit its viewers [write, owner]"
method: PATCH
path: "/sessions/{id}/access"
---

# Make the session private or workspace-visible, and edit its viewers \[write, owner\]

`PATCH /sessions/{id}/access`

## Request

- Base URL: `https://api.agentsky.dev/v1`
- URL: `https://api.agentsky.dev/v1/sessions/{id}/access`
- Auth: HTTP bearer

## Path parameters

- `id` string, required

## Request body

- object
  - `visibility` 'workspace' | 'private'
  - `add_viewers` string[]
  - `remove_viewers` string[]

## Response `200`

OK

- SessionAccess
  - `session_id` string, required
  - `title` string, nullable, required
  - `agent_type` string, required
  - `llm` string, required
  - `visibility` 'workspace' | 'private', required
  - `access` 'owner' | 'member' | 'viewer', required
  - `owner` object, required
    - `id` string
    - `name` string, nullable
    - `email` string, nullable
  - `workspace` object, required
    - `slug` string
    - `name` string
    - `personal` boolean
  - `viewers` object[], nullable, required
    - `email` string
    - `added_at` string, date-time

## Other responses

- `default`: Error — { error: { code, message, request_id } }

## Changes

- **2026-11-02** `e5e8f0229a99`: 4 info
  - added the optional property `error/request_id` to the response with the `default` status
  - the response property `error` became required for the status `default`
  - the response property `error/code` became required for the status `default`
  - the response property `error/message` became required for the status `default`

[Operation history](https://skmtc.dev/agentsky/apis/agentsky-developer-api/changes/sessions/:id/access/patch.md)

---

[API](https://skmtc.dev/agentsky/apis/agentsky-developer-api.md) - [All operations](https://skmtc.dev/agentsky/apis/agentsky-developer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/agentsky/apis/agentsky-developer-api/revisions/0d435187cd55?raw)
