# ノートの作成

`POST /api/note`

URL: https://repsona.com/ja/api/post-note

ノートを作成します。

## リクエストボディ

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string \| null | 必須 | ノートのタイトル (1〜255 文字) |
| `parentId` | body | integer \| null | 必須 | 親ノートの ID。必須です。最上位のノートにする場合は `null` を渡します。 |
| `projectId` | body | integer | 必須 | ノートが属するプロジェクトの ID |
| `description` | body | string \| null |  | ノートの本文 (Markdown、1,000,000 文字まで)。省略すると空の本文になります。 |
| `isWip` | body | boolean \| null |  | 作業中 (WIP) のノートかどうか。省略すると `false` です。 |

## リクエスト

```sh
curl -X POST "https://<space>.repsona.com/api/note" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Meeting notes",
    "parentId": null,
    "projectId": 297
  }'
```

## レスポンス

- 200: Note created
- 400: Invalid request payload
- 401: Authentication is required

## レスポンスの例

```json
{
  "note": {
    "id": 191,
    "parentId": null,
    "projectId": 297,
    "spaceId": 631,
    "name": "Meeting notes",
    "sortOrder": null,
    "isWip": false,
    "createdAt": 1793662651363,
    "updatedAt": 1793662651363,
    "deletedAt": null,
    "tags": []
  },
  "siblings": []
}
```
