# Get a document

`GET /v1/documents/{id}`

Returns a document's metadata and, unless includeBody is false, its Markdown body.

Scope: `docs:read`.

## Request

```bash
curl "https://api.lydie.co/v1/documents/01JCQ3V5MZ8G4ZK2X7T9R6N1PB" \
  -H "Authorization: Bearer $LYDIE_TOKEN"
```

## Path parameters

- `id` (ULID, required)

## Query parameters

- `includeBody` (boolean, optional): Default: `true`.

## Response

- `document` (Document, required): Document metadata. The body is not part of it.
  - `id` (ULID, required)
  - `workspaceId` (string, required): (1–64 chars)
  - `parentId` (ULID, required, nullable)
  - `title` (string, required): (1–255 chars)
  - `sortKey` (string, required): (1–256 chars)
  - `properties` (object, required)
  - `createdAt` (timestamp, required)
  - `updatedAt` (timestamp, required)
  - `deletedAt` (timestamp, required, nullable)
  - `createdBy` (string, optional, nullable): (≥ 1 chars)
  - `updatedBy` (string, optional, nullable): (≥ 1 chars)
- `body` (DocumentBody, required, nullable)
  - `markdown` (string, required)
  - `version` (string, required): Opaque content version; pass it as expectedVersion.

```json
{
  "document": {
    "id": "01JCQ3V5MZ8G4ZK2X7T9R6N1PB",
    "workspaceId": "01JCQ3TZ0WJ8K4M2X7T9R6N1PA",
    "parentId": null,
    "title": "Meeting notes",
    "sortKey": "a0",
    "properties": {
      "status": "draft"
    },
    "createdAt": "2026-11-12T09:30:00.000Z",
    "updatedAt": "2026-11-12T09:30:00.000Z",
    "deletedAt": null,
    "createdBy": null,
    "updatedBy": null
  },
  "body": null
}
```

Errors use the envelope described at https://developers.lydie.co/errors.md.
