Contents

ドキュメントの追加

POST /api/v2/documents

ドキュメントを追加します。

実行可能な権限

管理者
一般ユーザー

リクエストパラメーター

パラメーター名内容
projectId
(必須)
intプロジェクトのID。
プロジェクトのIDはプロジェクトの状態一覧の取得から取得できます。
titlestringドキュメントのタイトル。
contentstringドキュメントの内容。Markdown形式で記述できます。
emojistringドキュメントタイトル横に表示される絵文字。
parentIdstring親ドキュメントのID。このIDを指定した場合、ドキュメントはツリー上でparentIdのドキュメントの子として作成されます。
addLastbooleantrueにした場合、ドキュメントはツリー上の兄弟ドキュメントの中で末尾に作成されます。デフォルトはfalseで先頭に追加されます。

レスポンス例

レスポンスボディ

{
    "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"
}