Get document
GET /api/documents/{id}
GET
/api/documents/{id}
Returns a single document with full content by its ID. Only the document owner can access this endpoint. Requires authentication.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ” id
required
string
Document ID
Responses
Section titled “ Responses ”Full document with content and metadata
Full document with content and metadata
object
id
required
Unique document ID
string
slug
required
URL-friendly identifier
string
content
required
Full markdown content
string
storageKey
required
R2 object storage key
string
urlType
required
URL scheme: nanoid (free), user_scoped (/@username/slug), subdomain
string
userId
required
Owner user ID
string
status
required
Current status of the document
string
isPublic
required
Whether the document is publicly accessible
boolean
viewCount
required
Number of times the document was viewed
number
createdAt
required
Creation timestamp
string format: date-time
updatedAt
required
Last update timestamp
string format: date-time
Standard error response
Standard error response
object
error
required
Error code or short description
string
message
Human-readable error details
string
Standard error response
Standard error response
object
error
required
Error code or short description
string
message
Human-readable error details
string