---
title: "Read the doc body"
method: GET
path: "/api/workspaces/{slug}/doc"
tags: ["Doc body"]
---

# Read the doc body

`GET /api/workspaces/{slug}/doc`

## Request

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

Returns the workspace's doc body as ProseMirror JSON. 403 if the workspace is in table mode.

## Path parameters

- `slug` string, required

## Query parameters

- `surface` string: Surface slug for multi-doc workspaces. Omit for the primary doc surface.
- `format` 'json' | 'markdown' | 'text': Response shape: `json` (ProseMirror, default) · `markdown` (CommonMark + GFM, useful for LLM context or textual diff) · `text` (plain text, no formatting marks). Overrides `Accept` header.

## Response `200`

Doc body.

- object
  - `content` unknown
  - `markdown` string: CommonMark + GFM. Returned when `?format=markdown` (or `Accept: text/markdown` with no `?format`).
  - `text` string: Plain text, formatting marks stripped. Returned when `?format=text` (or `Accept: text/plain` with no `?format`).
  - `updatedAt` string, date-time, required
  - `updatedBy` string, required

## Other responses

- `403`: Workspace is in table mode (no doc surface).

---

[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)
