# PATCH /notepads/:id

**Resource:** [Notepads](./notepads.md)  
**Scopes:** `notepads:write`  
**Write operation:** yes

Update a notepad. Three editing modes: (1) replace (default) -- pass content to overwrite; (2) append/prepend -- set mode plus content to grow the document without re-sending existing text; (3) patches -- pass a patches array to replace or append to specific sections by heading text. Can also update visibility or folder_id. Response is slim by default -- pass return_content: true for full HTML.

## Parameters

| Name | In | Type | Required | Description |
|------|----|------|----------|-------------|
| `id` | path | uuid | yes | Notepad ID |
| `title` | body | string | no | Notepad title |
| `content` | body | string | no | Content as plain text/markdown. Used by modes replace, append, and prepend. |
| `folder_id` | body | uuid | no | Folder UUID (pass null to unfile) |
| `folder` | body | string | no | Folder name (legacy) |
| `visibility` | body | string | no | all_users, admins_only, creator_only, or restricted |
| `is_favorite` | body | boolean | no | Favourite status |
| `mode` | body | string | no | "replace" (default), "append", or "prepend". Append/prepend require content. Cannot combine with patches. |
| `patches` | body | array | no | Array of { match_heading, new_content, mode? } objects. match_heading is case-insensitive. Per-patch mode: "replace" (default, keeps heading), "replace_including_heading", "append_to_section". |
| `return_content` | body | boolean | no | Set true to include full rendered HTML in response. Default false. |

---
Base URL: `https://api.trustpager.com/functions/v1/api/v1` — Auth: `Authorization: Bearer YOUR_API_KEY`