Skip to content
Open in

JSON to HTML (API key)

POST
/landing-page/get-html

Convert a landing page JSON template definition to rendered HTML. This is the same rendering service the editor uses when a page is saved or previewed. Authentication is carried in the request body: the apiKey must be valid and the hostname must be on the key's allowed-domain list. This is the endpoint the editor itself calls; for server-to-server rendering prefer /landing-page/v1/json2html, which authenticates with the secret key and additionally reports missing fonts.

If the template contains synced sections (any section node with a syncedId property), pass their current content through the optional syncedSections request field. The endpoint looks up each syncedId in the supplied array and splices the section's full definition into the template before rendering, regenerating child block UIDs to avoid collisions. Without this field the page renders with the section content embedded in the template definition, which may be stale.

Request Body

application/json
JSON
{
  
"apiKey": "your-api-key",
  
"hostname": "your-app.example.com",
  
"userId": "user-123",
  
"definition": "{"tagName":"mj-global-style","children":[]}",
  
"options": {
  
  
"minify": true,
  
  
"fonts": "[{"label":"Open Sans","style":"Open Sans, sans-serif","url":"https://fonts.googleapis.com/css?family=Open+Sans:400,700"}]"
  
},
  
"syncedSections": [
  
  
{
  
  
  
"id": 1,
  
  
  
"definition": "{"tagName":"mj-section","uid":"synced-1","attributes":{},"mdAttributes":{},"smAttributes":{},"xsAttributes":{},"container":{"tagName":"mj-container","attributes":{},"mdAttributes":{},"smAttributes":{},"xsAttributes":{}},"children":[]}"
  
  
}
  
]
}

Responses

Template converted successfully

application/json
JSON
{
  
"html": "<html><body>Hello World</body></html>"
}

Playground

Body

Samples

Powered by VitePress OpenAPI