# Create note

`POST /api/note`

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

Creates a note in the current space.

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string \| null | required | Title of the note (1 to 255 characters). |
| `parentId` | body | integer \| null | required | ID of the parent note. Required: pass `null` to create a top-level note. |
| `projectId` | body | integer | required | ID of the project the note belongs to. |
| `description` | body | string \| null |  | Body of the note as Markdown (up to 1,000,000 characters). Defaults to an empty body. |
| `isWip` | body | boolean \| null |  | Marks the note as work in progress. Defaults to `false`. |

## Request

```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
  }'
```

## Responses

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

## Example response

```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": []
}
```
