# Update note

`PATCH /api/note/{noteId}`

URL: https://repsona.com/api/patch-note-noteid

Updates a note in the current space.

## Parameters

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `noteId` | path | integer | required | ID of the note. |

## Request body

| name | in | type | required | description |
| --- | --- | --- | --- | --- |
| `name` | body | string |  | Title of the note (1 to 255 characters). |
| `parentId` | body | integer \| null |  | ID of the new parent note, to move the note. `null` moves it to the top level. |
| `projectId` | body | integer |  | ID of the project to move the note to. |
| `description` | body | string \| null |  | Body of the note as Markdown (up to 1,000,000 characters). `null` clears it. |
| `isWip` | body | boolean \| null |  | Marks the note as work in progress. |

## Request

```sh
curl -X PATCH "https://<space>.repsona.com/api/note/{noteId}" \
  -H "Authorization: Bearer $REPSONA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Release checklist (v1)",
    "description": "## Before launch\n\n- Run the full regression suite\n- Confirm the redirect map with marketing\n- Announce the maintenance window\n- Back up the old site",
    "isWip": false
  }'
```

## Responses

- 200: Note updated
- 400: Invalid request payload or move state
- 401: Authentication is required
- 404: Note not found

## Example response

```json
{
  "note": {
    "id": 187,
    "parentId": null,
    "projectId": 288,
    "spaceId": 603,
    "name": "Release checklist (v1)",
    "sortOrder": null,
    "isWip": false,
    "createdAt": 1793662619233,
    "updatedAt": 1793662619266,
    "deletedAt": null,
    "tags": []
  },
  "siblings": []
}
```
