Vine of Time Logo
Open API Docs

Create Document

Admin
2026/4/3
8 阅读

Create Document

Endpoint

POST /api/open/documents

Request body

FieldTypeRequiredDescription
titlestringYesDocument title
slugstringNoURL slug
contentstringNoMarkdown content
excerptstringNoDocument summary
ordernumberNoSort order
publishedbooleanNoPublish state
parentIdstringNoParent document ID
categoryIdstringYes for top-level docsCategory ID
authorIdstringYesAuthor user ID

Behavior rules

  • Top-level documents must provide categoryId.
  • Child documents inherit the top-level category automatically.
  • If slug is omitted, the server generates one from the title.
  • Make sure the author exists before calling the API.
  • Use a stable slug strategy in production.
  • Keep order small for documents that should appear earlier.