---
title: "Update a note"
method: PATCH
path: "/public-api/v1/notes/{id}"
tags: ["Notes"]
---

# Update a note

`PATCH /public-api/v1/notes/{id}`

## Request

- Base URL: `https://app.hellobonsai.com`
- URL: `https://app.hellobonsai.com/public-api/v1/notes/{id}`
- Auth: one of:
  - OAuth 2
    - Authorization code: `https://app.hellobonsai.com/oauth/authorize`
    - Token URL: `https://app.hellobonsai.com/oauth/token`
  - HTTP bearer

Rewrites what a note says. Every field is optional, and anything you
leave out keeps its current value.

Anyone can edit a note they wrote; editing someone else's needs
permission to write notes. A note the token cannot see returns `404`,
and one it can see but may not change returns `403`.

`visibility` is the author's to set: an edit from anybody else that
changes it returns `403` and writes nothing at all, not even the rest
of the payload. Sending back the value the note already has is
accepted, so reading a note, changing one field and returning the
whole thing works whoever you are.

The records a note is attached to are fixed once it is written, so
`record_type` and `record_id` are not accepted here.

## Formatting

`content_html` is HTML and replaces the whole body. It is the same
shape `GET /public-api/v1/notes/{id}` hands back, so read that field,
change the part you need and send the result — whatever you leave
alone survives the edit untouched.

Markdown is not accepted here; sending the `content` that
`POST /public-api/v1/notes` takes returns `422` naming `content_html`,
rather than leaving the edit to vanish. The create endpoint takes
Markdown because a new note has nothing to preserve, while an edit
does, and Markdown cannot express mentions, images or merged table
cells.

Task list items carry the state the editor reads back, so keep their
attributes as they came:

    <ul data-type="taskList">
      <li data-type="taskItem" data-checked="true"><p>Confirm budget</p></li>
      <li data-type="taskItem" data-checked="false"><p>Send the quote</p></li>
    </ul>

## Path parameters

- `id` string, uuid, required

## Request body

- object
  - `note` object, required
    - `content_html` string: The new note body, as HTML, replacing the current one. Read the current HTML from `GET /public-api/v1/notes/{id}`. Cannot be emptied.
    - `title` string, nullable: New note title. Send an empty string to remove it.
    - `date` string, date, nullable: The day the note is about. `null` is ignored rather than clearing it.
    - `visibility` 'everyone' | 'author_only' | 'null', nullable: Who can read the note: `everyone` for the whole account, `author_only` for nobody but its author. Only the member who wrote the note can change this. `null` is ignored rather than resetting it to `everyone`.

## Response `200`

The note was updated.

- object
  - `data` object, required: The body of the note, returned when you write or retrieve a single note but never in a list.
    - `id` string, uuid, required: Unique identifier for the note.
    - `title` string, required: Note title. Empty when the note was written without one.
    - `date` string, date, nullable, required: The day the note is about, which is what the app sorts and groups notes by. Defaults to today in your account timezone.
    - `visibility` 'everyone' | 'author_only', required: `everyone` for a note the whole account can read, `author_only` for one only its author can. Defaults to `everyone`, and only the member who wrote the note can change it.
    - `created_by_member_id` integer, nullable, required: Team member id of the author, or `null` when they are no longer a member of your account.
    - `created_at` string, date-time, required: When the note was written.
    - `updated_at` string, date-time, required: When the note was last edited.
    - `note_links` NoteLink[], required: The records this note is attached to, leaving out any your token cannot reach. Empty for a workspace note that stands on its own.
      - `id` integer, required: Unique identifier for the attachment between the note and the record.
      - `record_id` integer, required: Id of the attached record, in the resource named by `record_type`.
      - `record_type` 'company' | 'project' | 'contact' | 'deal' | 'null', nullable, required: Which kind of record the note is attached to.
    - `content_html` string, nullable, required: The note body in the HTML the Bonsai editor renders, scrubbed of script-execution vectors. This is the field to send back to `PATCH /public-api/v1/notes/{id}`: read it, change what you need and return it, and everything you left alone is preserved. `null` only when the note has no body at all. Returned on single-note responses only, never in a list.
    - `content_plain_text` string, nullable, required: The same body with the markup removed, for when you only need to read what the note says. It cannot be sent back — the update endpoint takes `content_html`. `null` here means the body holds no text, not that the note is empty: a note containing only an image or a table returns `null` while `content_html` returns the body. Returned on single-note responses only, never in a list.
  - `meta` Meta, required: Metadata returned alongside every single-resource response.
    - `request_id` string, required: Identifier for this request. Quote it when contacting support about a specific call.

## Other responses

- `400`: The request body is missing its `note` wrapper.
- `401`: The access token is missing, expired or invalid.
- `403`: This token can see the note but is not allowed to change it, or tried to change the `visibility` of a note it did not write.
- `404`: No note with that `id` that this token can see. A deleted note returns `404` too.
- `422`: The note could not be saved. `blank` means `content_html` was emptied, or held only markup that is stripped before storing; `invalid_value` means a field was the wrong shape, or `content` was sent where `content_html` belongs.
- `429`: Rate limit exceeded. Wait at least `Retry-After` seconds before trying again.

---

[API](https://skmtc.dev/hellobonsai/apis/bonsai-api.md) - [All operations](https://skmtc.dev/hellobonsai/apis/bonsai-api/llms.txt) - [OpenAPI document](https://skmtc.dev/hellobonsai/apis/bonsai-api/revisions/abf12ed6a8d3?raw)
