> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sublay.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Fetch Workspace

> Read a single workspace, visibility-filtered

Returns a single [Workspace](/v8/data-models/workspace), filtered by the caller's reach-visibility — a caller never sees a node their authority doesn't reach.

## Path Parameters

<ParamField path="id" type="string" required>
  The workspace UUID.
</ParamField>

## Query Parameters

<ParamField query="include" type="string">
  Comma-separated include flags. `memberCount` adds the workspace's **direct** member count as `memberCount` on the object.
</ParamField>

<ParamField query="actingUserId" type="string">
  Service/master keys only — the user to act as. Enforced: visibility resolves against the named user, so a key acting as someone with no relation to this workspace gets the same `404` that user would. Omit it to read as the app itself (unbounded) — where "omit" means **absent**: `actingUserId: ""` or `null` is a `400`, not a fall-through to that mode. See [Acting on behalf of a user](/v8/sdk/workspaces/overview#acting-on-behalf-of-a-user).
</ParamField>

## Response

Returns the [Workspace](/v8/data-models/workspace) object.

## Error Responses

<AccordionGroup>
  <Accordion title="Not Found / Not Visible — 404">
    ```json theme={null}
    { "error": "Workspace not found.", "code": "workspace/not-found" }
    ```
  </Accordion>

  <Accordion title="Invalid Path Parameter — 400">
    ```json theme={null}
    { "error": "Invalid workspace id: expected a UUID.", "code": "workspace/invalid-params" }
    ```

    Every path id on the workspaces bundle is checked for UUID shape before the route runs, so a malformed one is a plain `400` rather than a `500` from the database.
  </Accordion>
</AccordionGroup>

See also: [useFetchWorkspace](/v8/hooks/workspaces/use-fetch-workspace)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.