cURL
curl --request POST \ --url https://{notifuseDomain}/api/templates.compile \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "template_content": {}, "template_data": { "user_name": "John Doe", "action_url": "https://example.com/action" } }'
{ "html": "<string>", "errors": [ "<string>" ] }
Compiles an MJML template with provided data, returning the rendered HTML. Useful for previewing templates before saving.
API token for authentication
MJML template structure to compile
Data to use for Liquid templating
{ "user_name": "John Doe", "action_url": "https://example.com/action"}
Template compiled successfully
Compiled HTML output
Compilation errors, if any