NoteDetailedTrait

The body of the note, returned when you write or retrieve a single note but never in a list.

  • content_html
    Type: string | null
    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
    Type: string | null
    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.