Text and HTML
Render plain text, Markdown, and sanitized HTML without unsafe assumptions.
LongText output depends on the field’s configured format.
| Format | Raw value | Generated HTML |
|---|---|---|
| Plain | String | None |
| Markdown | Markdown string | REST with render=html |
| Rich | Tiptap JSON | REST with render=html |
Published Delivery keys authorize the Backend and Environment, and fields hidden from the API remain absent. Preview also enforces the delegated human’s resource and Field scopes; rendering HTML never expands access.
Markdown
Request the resource with ?render=html:
curl 'https://delivery.example.com/rest/article/ARTICLE_ID?render=html' \
-H 'x-api-key: YOUR_DELIVERY_KEY'
{
"body": "# Hello\n\n- one\n- two",
"body_html": "<h1>Hello</h1>\n<ul>\n<li>one</li>\n<li>two</li>\n</ul>"
}
Markdown conversion supports GitHub Flavored Markdown and frontmatter parsing. The returned HTML is sanitized to a narrow tag and attribute allowlist.
Rich text
{
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [{ "type": "text", "text": "Hello" }]
}
]
}
Rich input delivers as structured JSON; its HTML sibling contains sanitized rendered markup. Unsupported nodes are reduced to renderable children, and unsafe scripts or links are removed.
REST render=html applies recursively to Components and eligible Term custom fields. HTML is null for empty input. A generated <field>_html sibling is omitted when a real field already uses that key.