Get Document
documents:read role.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
GET /v1/documents/
GET /v1/documents/{document_id}
documents:read role.
| Header | Required | Description |
|---|---|---|
X-API-Key | Yes | Your API key |
| Parameter | Type | Description |
|---|---|---|
document_id | string | The document ID |
curl https://api.surfacedocs.dev/v1/documents/doc_abc123 \
-H "X-API-Key: sd_live_..."
{
"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"
}
| Code | Description |
|---|---|
| 404 | Document not found |
| 403 | Access denied (not the document owner) |