Contents
Add document
Adds a new document.
Role
Administrator
Normal User
Method
POST
URL
/api/v2/documents
Form parameters
| Parameter Name | Type | Description |
|---|---|---|
| projectId (Required) | int | Project ID |
| title | string | The title of the document |
| content | string | The content of the document. This is parsed as Markdown. |
| emoji | string | Emoji icon shown alongside the document title. |
| parentId | string | The ID of the parent document. When this ID is specified, the document will be created as a child node of the given parentId in the tree. |
| addLast | boolean | If true, the document is created as the last sibling in the tree. Default is false (adds to the beginning). |
Response example
Response Body
{
"id": "019b4e27b88b7cc4ae16d72c3de62299",
"projectId": 1,
"title": "document title",
"json": {
"type": "doc",
"content": [
{
"type": "heading",
"attrs": {
"id": "NmU",
"level": 1
},
"content": [
{
"type": "text",
"text": "head"
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "hello"
}
]
}
]
},
"plain": "# head \n hello",
"statusId": 1,
"emoji": "👍",
"createdUserId": 2,
"created": "2025-12-24T02:19:42Z",
"updatedUserId": 2,
"updated": "2025-12-24T02:19:42Z"
}