Skip to main content

Public Documents

Access published documents without authentication. Documents must be published first using the Publish Document endpoint.

Base Path: /api/v1/public/documents Authentication: Not Required Tag: Public Documents

tip

These endpoints are fully public — no Bearer token needed. Only documents that have been explicitly published are accessible.


Get Public Document

Retrieve a published document with full content.

GET /public/documents/{documentId}

Path Parameters

ParameterTypeDescription
documentIdUUIDDocument ID

Response

{
"success": true,
"data": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"title": "Public Knowledge Base",
"content": "[{\"type\":\"paragraph\",\"content\":[...]}]",
"icon": "📚",
"coverImageUrl": "https://...",
"parentId": null,
"hasChildren": true,
"childCount": 5,
"wordCount": 1200,
"updatedAt": "2025-01-15T10:30:00Z"
}
}

Response Type: ApiResponse<PublicDocumentResponse>

info

The public response excludes sensitive fields like ownerId, workspaceId, yjsState, isArchived, and isTemplate.


Get Children

Retrieve children of a published document.

GET /public/documents/{documentId}/children

Path Parameters

ParameterTypeDescription
documentIdUUIDParent document ID

Response

{
"success": true,
"data": [
{
"id": "...",
"title": "Chapter 1",
"icon": "📖",
"parentId": "550e8400-e29b-41d4-a716-446655440000",
"hasChildren": true,
"childCount": 3
}
]
}

Response Type: ApiResponse<List<PublicDocumentListResponse>>


Get Ancestors (Breadcrumb)

Retrieve the ancestor chain for breadcrumb navigation in published documents.

GET /public/documents/{documentId}/ancestors

Path Parameters

ParameterTypeDescription
documentIdUUIDDocument ID

Response Type: ApiResponse<List<PublicDocumentListResponse>>