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

# Get Document

> GET /v1/documents/{id}

# Get Document

```
GET /v1/documents/{document_id}
```

Retrieve a document and all its blocks. Requires the `documents:read` role.

## Request

### Headers

| Header      | Required | Description  |
| ----------- | -------- | ------------ |
| `X-API-Key` | Yes      | Your API key |

### Path Parameters

| Parameter     | Type   | Description     |
| ------------- | ------ | --------------- |
| `document_id` | string | The document ID |

### Example

```bash theme={null}
curl https://api.surfacedocs.dev/v1/documents/doc_abc123 \
  -H "X-API-Key: sd_live_..."
```

## Response

**Status: 200 OK**

```json theme={null}
{
  "id": "doc_abc123",
  "url": "https://app.surfacedocs.dev/d/doc_abc123",
  "folder_id": "fld_xyz",
  "title": "API Guide",
  "content_type": "markdown",
  "metadata": null,
  "visibility": "private",
  "blocks": [
    {
      "id": "blk_001",
      "order": 0,
      "type": "heading",
      "content": "Overview",
      "metadata": {"level": 1}
    },
    {
      "id": "blk_002",
      "order": 1,
      "type": "paragraph",
      "content": "Welcome to the API.",
      "metadata": null
    }
  ],
  "created_at": "2025-01-15T10:30:00Z",
  "updated_at": "2025-01-15T10:30:00Z"
}
```

## Errors

| Code | Description                            |
| ---- | -------------------------------------- |
| 404  | Document not found                     |
| 403  | Access denied (not the document owner) |
