Update Note
update_noteChange an existing note's text, type, format, tags, or privacy flag in Gramps Web. Replace the whole body, edit a fragment, or append text.
Instructions
Change an existing note: its text, type, format, tags or private flag. text replaces the whole body. For a long note, replaceText with withText changes one fragment and appendText adds to the end: both work on the body as stored now and keep the rest of it, styling and links included. 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, though the linked records themselves stay in the tree. 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. For a new note use create_note; to remove one, delete_object. Writes run one at a time and need a Gramps Web account allowed to edit the tree; a locked or rate-limited write fails with the delay to wait before retrying it.
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"). | |
| withText | No | The text to put in place of replaceText; an empty string deletes the fragment. | |
| isPrivate | No | true makes the record private, false public. Omit to leave unchanged. | |
| appendText | No | Text to add at the end of the body, on a new line: a line break is put in between unless the body already ends with one, so start with a line break to leave an empty line. The rest of the body, styling and links included, is kept. Cannot be combined with text. | |
| 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":"…"}. | |
| replaceText | No | A fragment of the body to replace with withText, copied exactly as stored, spaces, line breaks and letter case included. It must occur once: include enough of the surrounding text to make it unique. The rest of the body, styling and links included, is kept. Applied before appendText; cannot be combined with text. |