Contents

Add document

Adds a new document.

Role

Administrator
Normal User

Method

POST

URL

/api/v2/documents

Form parameters

Parameter NameTypeDescription
projectId
(Required)
intProject ID
titlestringThe title of the document
contentstringThe content of the document. This is parsed as Markdown.
emojistringEmoji icon shown alongside the document title.
parentIdstringThe 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.
addLastbooleanIf 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"
}