Note Data Examples
Ready-to-use examples of properly formatted HTML for the note_data field, covering every formatting feature the Notes API supports. Each snippet below has been verified to round-trip through the API's normalizer with no content loss — you can copy any of them directly into a create, update, or append request.
Two things to keep in mind while reading (full details in Constructing note_data safely):
The stored HTML will not be byte-identical to what you send. The normalizer adds editor classes and scaffolding (e.g.
class="editor-code-block", table<colgroup>/<tbody>, task-list checkbox markup) and canonicalizes equivalent tags (<b>→<strong>). Your content and structure are preserved.Whitespace between tags is insignificant. The indentation in these examples is for readability; it collapses on storage. Line breaks inside
<pre><code>blocks are preserved exactly.
Basic document structure
Headings, paragraphs, and horizontal rules:
<h1>Device Intake Report</h1>
<p>Device received from <strong>Det. Rivera</strong> on <em>August 3, 2026</em>.</p>
<h2>Condition</h2>
<p>Screen cracked, powers on normally. No SIM card present.</p>
<hr>
<p>Photographed and bagged as <code>EV-2026-0042-001</code>.</p>Heading levels <h1> through <h6> are supported. Bare text outside any tag is accepted too — it gets wrapped in a paragraph automatically.
Inline formatting
<p><strong>Bold</strong>, <em>italic</em>, <u>underlined</u>, <s>struck through</s>, and <code>inline code</code>.</p>
<p>Combined: <strong><em>bold italic</em></strong> and <u><strong>underlined bold</strong></u>.</p><b>, <i>, <del>, and <strike> are accepted as input and stored canonically as <strong>, <em>, and <s>.
Text color and highlighting
Text color must be a color style on a <span> — a color style on a paragraph or heading is stripped. Highlights take any color via data-color on <mark>.
Text alignment
text-align (left, center, right, justify) works on paragraphs and headings only.
Links
http, https, mailto, tel, ftp, and relative URLs all work. Unsafe schemes (javascript:, data:) are removed, leaving the anchor text as plain text. target, rel, and class on links are always overwritten with the editor's values, so there is no point setting them.
Bullet and numbered lists
Lists nest by placing a <ul>/<ol> inside an <li>, as shown.
Task lists (checkboxes)
The data-type attributes are required — a plain <ul> becomes a bullet list instead. On storage each item is expanded with the editor's checkbox markup (<label><input type="checkbox">...); when you update a task list programmatically, only the data-checked values matter.
Code blocks
The
language-*class on<code>selects syntax highlighting (defaults toplaintext).data-wrap="true"on the<pre>enables soft line wrapping in the editor.Whitespace and newlines inside the block are preserved exactly — this is the right place for tool output, logs, and hashes.
HTML-escape the code content (
<,>,&) if it can contain angle brackets.
Blockquotes
Tables
colspan and rowspan are supported. Cell content is wrapped in paragraphs on storage, and the table gains <colgroup>/<tbody> scaffolding — both harmless. Any block element (lists, code blocks) can go inside a cell.
Images
The first form is the
markupstring returned byPOST /v1/notes/{uuid}/images— embed it verbatim; the emptysrcis filled with a fresh signed URL on every read, matched bydata-uuid.Size with the
width/heightattributes; style-based sizing is stripped.Base64
data:URIs are accepted but stored inline in the note body — prefer the upload endpoint for anything non-trivial.
Putting it all together
A complete examination note combining most features:
Posting it with Python
Building HTML safely from data
When generating note_data from variables, escape anything that isn't markup:
Last updated
Was this helpful?