# documents.read

Read a ThinkBench document and return its current content as Markdown.

`GET /api/v1/documents/{documentId}`

- SDK: [`tb.documents.read(input)`](/sdk)
- CLI: [`thinkbench documents read`](/cli)
- MCP tool: [`documents_read`](/mcp)

## Input

| Field | Type | In | Description |
| --- | --- | --- | --- |
| `documentId` | `string` | path | The document's id, from its URL or a listing. |

## Output

| Field | Type | Description |
| --- | --- | --- |
| `item` | [DriveItem](/api/objects/drive-item) |  |
| `markdown` | `string` |  |
| `prosemirrorDoc` | `unknown` |  |
| `authors` | `object[]` | Who edited this most recently. |

## Examples

### curl

```bash
curl "https://app.thinkbench.com/api/v1/documents/<documentId>" \
  -H "x-api-key: $THINKBENCH_API_KEY"
```

### TypeScript SDK

```ts
const result = await tb.documents.read({ documentId: "<documentId>" });
```

### CLI

```bash
thinkbench documents read --document-id "<documentId>"
```

### MCP

```json
{
  "name": "documents_read",
  "arguments": {
    "documentId": "<documentId>"
  }
}
```

## Notes

The `markdown` and `prosemirrorDoc` projections come from one live snapshot
of the collaborative document, so they always agree — and both include edits
other people (or agents) are making right now, before they're saved to
version history.

To pull just the Markdown from the CLI:

```bash
npx thinkbench documents read --document-id "<documentId>" --pick markdown
```
