MailcrateDocs
Rendering

Render HTML with data

POST
/public/render

Renders a Liquid HTML string with data, without sending anything. Useful to check a template before you save it.

Requires the rendering:write scope.

Authorization

ApiKey
headerAuthorization<token>

Api-Key mc_... — a workspace API key.

Request Body

application/json
  1. body
html*string

Template HTML, using Liquid variables such as {{ firstName }}.

data?

Values for the variables.

Response Body

application/json
  1. response
html*string

The rendered HTML.

Example Request
curl -X POST 'https://api.mailcrate.io/public/render' \  -H 'Authorization: Api-Key <api_key>' \  -H 'Content-Type: application/json' \  -d '{  "html": "string"}'
Example Response
{  "html": "string"}