Render markdown to HTML. Each block carries its source position (DEC-017).
POST
/render
const url = 'https://example.com/api/v1/render';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"markdown":"example","doc_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","path":"example"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/api/v1/render \ --header 'Content-Type: application/json' \ --data '{ "markdown": "example", "doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "path": "example" }'Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
object
markdown
required
string
doc_id
When set, relative image links resolve to files of this spec doc’s version.
string format: uuid
path
The path of the file in the bundle, so relative links resolve from its folder.
string
Examplegenerated
{ "markdown": "example", "doc_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "path": "example"}Responses
Section titled “ Responses ”The HTML.
Media typeapplication/json
object
html
required
HTML. Each block element has data-src-start and data-src-end (byte offsets into the markdown) and data-line (the 1-based first line). Mermaid blocks are
.
string
Examplegenerated
{ "html": "example"}default
Section titled “default”An error.
Media typeapplication/problem+json
RFC 9457 problem details with a stable code.
object
type
required
string
title
required
string
status
required
integer
detail
string
instance
string
code
required
A stable machine-readable error code.
string
Examplegenerated
{ "type": "example", "title": "example", "status": 1, "detail": "example", "instance": "example", "code": "example"}