---
title: "Get workspace detail"
method: GET
path: "/api/workspaces/{slug}"
tags: ["Workspaces"]
---

# Get workspace detail

`GET /api/workspaces/{slug}`

## Request

- Base URL: `https://trydock.ai`
- URL: `https://trydock.ai/api/workspaces/{slug}`
- Auth: HTTP bearer

Fetch a workspace by slug, including columns, member count, mode, and visibility.

## Path parameters

- `slug` string, required

## Response `200`

Workspace detail.

- object
  - `workspace` Workspace, required
    - `id` string, required
    - `slug` string, required
    - `name` string, required
    - `mode` 'table' | 'doc', required: Default-view hint (which tab opens first). A workspace can hold any combination of table + doc surfaces regardless of mode.
    - `visibility` 'private' | 'org' | 'unlisted' | 'public', required: Who can see and edit. `private` = explicit members only. `org` = every org member is virtual editor. `unlisted` = anyone with the URL can read. `public` = indexed by search.
    - `createdAt` string, date-time, required
    - `archivedAt` string, date-time, nullable, required
    - `pinnedAt` string, date-time, nullable, required: When the calling principal pinned the workspace; null if not pinned by them. Pin is per-user, not org-wide.
    - `role` 'owner' | 'editor' | 'commenter' | 'viewer', required: The calling principal's effective role.
    - `createdBy` object, nullable, required: Null on legacy rows from before attribution shipped.
      - `principalType` 'user' | 'agent', required: Whether the actor is a human user or a Dock-managed agent.
      - `id` string, required
      - `name` string, required
      - `avatarUrl` string, nullable, required
    - `org` object, required
      - `slug` string, required
    - `primarySurface` Surface
      - `id` string, required
      - `slug` string, required
      - `kind` 'table' | 'doc', required

## Other responses

- `403`: Not a member of this workspace's org or the workspace itself.
- `404`: Workspace not found (or visibility hides it from the caller).

---

[API](https://skmtc.dev/trydock/apis/dock-rest-api.md) - [All operations](https://skmtc.dev/trydock/apis/dock-rest-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trydock/apis/dock-rest-api/revisions/dd96ae96a412?raw)
