Update Note
update_noteChange an existing note's text, type, format, tags, privacy, or linked handles without altering omitted fields. Specify only what changes; use linkMode to replace, add, or remove links.
Instructions
Change an existing note: its text, type, format, tags or private flag; new text replaces the whole body. Pass only what changes; omitted arguments stay as they are. Link lists (…Handles, …Refs) follow linkMode: replace (default) sets the whole list, add appends, remove drops the given handles; in replace mode [] REMOVES every link of that kind. Returns the handle and Gramps ID; a missing note returns a not-found message. Which records the note is attached to is stored on them (their noteHandles), not here.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | No | New text, replacing the whole body; changed text loses the styling and links of the old one, the same text keeps them. Omit to leave unchanged. | |
| format | No | Plain or Html. Omit to leave unchanged. | |
| handle | Yes | The note to change. Handle or Gramps ID (e.g. I0001), resolved automatically; find it with search or list_objects. | |
| linkMode | No | How to apply all supplied link lists: replace (default) replaces each full list, and a link it keeps keeps its stored privacy, citations, notes and crop unless the call sends new values; add appends missing handles and preserves existing link metadata; remove removes all links matching supplied handles (reference metadata is ignored). Omitted lists stay unchanged; empty lists clear only in replace mode. Does not affect attributes, names, addresses or URLs. Use separate calls to add and remove, or replace to edit existing link metadata. | replace |
| noteType | No | New note type. Omit to leave unchanged. Must be a standard Gramps type or a custom one the tree already uses; anything else is rejected with suggestions. List: get_reference(topic: "types"). | |
| isPrivate | No | true makes the record private, false public. Omit to leave unchanged. | |
| tagHandles | No | Tags. Omit to keep; applied per linkMode. Handles, not Gramps IDs: JSON array ["h1","h2"], one handle, or a comma/semicolon/newline-separated string; entries may also be objects {"ref":"…"}. |