Render Template
POST {{baseUrl}}/v1/email-template/:template_id/render
Renders the specified template with the provided data and return HTML and text versions of the email.
Request Body
[{"name"=>"context", "value"=>"{ \"name\" : \"George Washington\", \"state\" : \"VA\" }", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: OK
{"object":"email-template","name":"TEMPLATE_NAME","data":{"html":"\u003chtml\u003e\u003cbody\u003e\u003cp\u003eThis is an email for {{ email }}.\u003c/p\u003e\u003c/body\u003e\u003c/html\u003e","text":"This is an email for george.washington@klaviyo.com"}}