Update document
PATCH /api/documents/{id}
Updates a document’s content, title, slug, or visibility. All fields are optional — only provided fields are updated. Custom filenames require Pro+ plan. Returns 400 if the slug is already taken.
Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Document ID
Request Body
Section titled “Request Body ”Body
Request body for updating a document (all fields optional)
object
Updated markdown content
Updated title
Updated filename (Pro+ only)
Updated visibility
Responses
Section titled “ Responses ”Full document with content and metadata
Full document with content and metadata
object
Unique document ID
URL-friendly identifier
Full markdown content
R2 object storage key
URL scheme: nanoid (free), user_scoped (/@username/slug), subdomain
Owner user ID
Current status of the document
Whether the document is publicly accessible
Number of times the document was viewed
Creation timestamp
Last update timestamp
Standard error response
Standard error response
object
Error code or short description
Human-readable error details
Standard error response
Standard error response
object
Error code or short description
Human-readable error details
Standard error response
Standard error response
object
Error code or short description
Human-readable error details