Skip to navigation

Render a template

Injects content and merge variables into a template, returning the HTML that results.

Request

This endpoint expects an object.
keystringRequired
A valid Mandrill API key
template_namestringRequired
Immutable name or slug of a template that exists in the user's account
template_contentlist of objectsRequired
Array of template content to render
merge_varslist of objects or nullOptional
Optional merge variables to use for injecting merge field content

Response

Success
htmlstring
Rendered HTML as a string with content and merge variables injected

Errors

401
Unauthorized Error
404
Not Found Error
500
Internal Server Error