Render a template
POST
Fills the template (and its wrapper and embedded templates) with the JSON object you send and returns the result. Use it to preview an email. Nothing is saved or sent. Your account's details are added as account unless the body has its own. The body must be a JSON object. Secret and trusted tokens may call it; a limited token may not (403).
header
AuthorizationBearer <token>A secret, trusted or limited token. See Authentication.
template_id*stringThe template id.
application/json- body
The values the template reads.
[key: string]?anyThe rendered template.
application/json- response
A template filled with your data.
data?stringThe rendered output, usually HTML, with CSS inlined.
curl -X POST 'https://api.comecero.com/api/v1/templates/string/build' \ -H 'Content-Type: application/json' \ -d '{ "customer": { "first_name": "John" }, "download_url": "https://example.com/downloads/abc123"}'Example Response
{ "data": "<p>Hi John, your download is ready: https://example.com/downloads/abc123</p>"}