actualNoteContentPart: # Plugin API Reference Documentation: Note interface
  The note interface provides a more convenient way to interact with the app interface functions that operate on a specific [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle) . Note that - like a [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle)  - the note described by the note interface may or may not exist. Calling functions that modify the note content will create the note if it doesn't already exist.
  
  ## note.addTag
  Add a tag to the note. See [app.addNoteTag](/help/developing_amplenote_plugins/app_interface#app.addNoteTag)  for details.
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    const added = await note.addTag("some-tag");    app.alert(added ? "Tag added" : "Failed to add tag");  }}
  ```
  
  ## note.attachMedia
  Attach a media file (image or video) to the note. See [app.attachNoteMedia](/help/developing_amplenote_plugins/app_interface#app.attachNoteMedia)  for more details.
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);      // 1x1 gray PNG (from http://png-pixel.com)    const dataURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPcsv/MfwAHrgNAOkBd9gAAAABJRU5ErkJggg==";    const imageURL = await note.attachMedia(dataURL);    app.alert(`ImageURL: ` + imageURL);  }} 
  ```
  
  ## note.attachments
  Gets a list of [attachment](/help/developing_amplenote_plugins/appendix_i#attachment) s in the note. See [app.getNoteAttachments](/help/developing_amplenote_plugins/app_interface#app.getNoteAttachments)  for details.
  ```
  {   async noteOption(app, noteUUID) {     const note = await app.notes.find(noteUUID);     const attachments = await note.attachments();     await app.alert(`${ attachments.length } attachments`);   } } 
  ```
  
  ## note.backlinkContents
  Get the content of backlinks from a specific source note to the note. See [app.getNoteBacklinkContents](/help/developing_amplenote_plugins/app_interface#app.getNoteBacklinkContents)  for details.
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);     const sourceNoteHandles = await app.backlinks();    if (sourceNoteHandles.length > 0) {      const sourceNoteHandle = sourceNoteHandles[0];      const backlinkContents = await note.backlinkContents(sourceNoteHandle);      await app.alert(backlinkContents.join("\n\n"));    } else {      await app.alert("Note has no backlinks");    }  }}  
  ```
  
  
  ## note.backlinks
  Gets the list of notes that link to the note. See [app.getNoteBacklinks](/help/developing_amplenote_plugins/app_interface#app.getNoteBacklinks)  for details.
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);     let count = 0;    for await (const referencingNoteHandle of note.backlinks()) {      count++;    }    await app.alert("backlinks count: " + count);  }}
  ```
  
  ## note.content
  Get the content of the note, as markdown. See [app.getNoteContent](/help/developing_amplenote_plugins/app_interface#app.getNoteContent)  for more details. 
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    app.alert(await note.content());  }}
  ```
  
  ## note.delete
  Delete the note. See [app.deleteNote](/help/developing_amplenote_plugins/app_interface#app.deleteNote)  for more details.
  ```
  {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    await note.delete();  }} 
  ```
processedNoteContent: ---
  title: Note Interface: Query or perform actions on a note
  tags: 
  headers: # Plugin API Reference Documentation: Note interface
  ---
  Plugin API Reference Documentation: Note interface
  The note interface provides a more convenient way to interact with the app interface functions that operate on a specific [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle)
   . Note that - like a [noteHandle](/help/developing_amplenote_plugins/appendix_i#noteHandle)
    - the note described by the note interface may or may not exist. Calling functions that modify the note content will create the note if it doesn't already exist. 
  note.addTag
  Add a tag to the note. See [app.addNoteTag](/help/developing_amplenote_plugins/app_interface#app.addNoteTag)
    for details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    const added = await note.addTag("some-tag");    app.alert(added ? "Tag added" : "Failed to add tag");  }}
  
  note.attachMedia
  Attach a media file (image or video) to the note. See [app.attachNoteMedia](/help/developing_amplenote_plugins/app_interface#app.attachNoteMedia)
    for more details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);      // 1x1 gray PNG (from http://png-pixel.com)    const dataURL = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mPcsv/MfwAHrgNAOkBd9gAAAABJRU5ErkJggg==";    const imageURL = await note.attachMedia(dataURL);    app.alert(`ImageURL: ` + imageURL);  }} 
  
  note.attachments
  Gets a list of [attachment](/help/developing_amplenote_plugins/appendix_i#attachment)
   s in the note. See [app.getNoteAttachments](/help/developing_amplenote_plugins/app_interface#app.getNoteAttachments)
    for details. {   async noteOption(app, noteUUID) {     const note = await app.notes.find(noteUUID);     const attachments = await note.attachments();     await app.alert(`${ attachments.length } attachments`);   } } 
  
  note.backlinkContents
  Get the content of backlinks from a specific source note to the note. See [app.getNoteBacklinkContents](/help/developing_amplenote_plugins/app_interface#app.getNoteBacklinkContents)
    for details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);     const sourceNoteHandles = await app.backlinks();    if (sourceNoteHandles.length > 0) {      const sourceNoteHandle = sourceNoteHandles[0];      const backlinkContents = await note.backlinkContents(sourceNoteHandle);      await app.alert(backlinkContents.join("\n\n"));    } else {      await app.alert("Note has no backlinks");    }  }}  
  
  note.backlinks
  Gets the list of notes that link to the note. See [app.getNoteBacklinks](/help/developing_amplenote_plugins/app_interface#app.getNoteBacklinks)
    for details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);     let count = 0;    for await (const referencingNoteHandle of note.backlinks()) {      count++;    }    await app.alert("backlinks count: " + count);  }}
  
  note.content
  Get the content of the note, as markdown. See [app.getNoteContent](/help/developing_amplenote_plugins/app_interface#app.getNoteContent)
    for more details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    app.alert(await note.content());  }}
  
  note.delete
  Delete the note. See [app.deleteNote](/help/developing_amplenote_plugins/app_interface#app.deleteNote)
    for more details. {  async noteOption(app, noteUUID) {    const note = await app.notes.find(noteUUID);    await note.delete();  }}
noteTitle: Note Interface: Query or perform actions on a note