Creating an HTML note (with HTML content) via the API post: keep getting errors

I was finally able to solve this but I had to use a python package to do it. I used Joppy (github).

Here is the code I use:

from joppy.api import Api, Note

# Create a new Api instance.
api = Api(token="7555525525442e")

noteBODY = '''<p>Note with the HTML features</p>
<br>new line
<br>new line
<br>new line
'''
noteID = api.add_note(
    title="test html note", body=noteBODY, markup_language="2")
print(noteID)
2 Likes