Render and Send Template
POST {{baseUrl}}/v1/email-template/:template_id/send
Renders the specified template with the provided data and send the contents in an email via the service specified. This API is intended to test templates only, and is rate limited to the following thresholds: 100/hour, 1,000/day.
Request Body
[{"name"=>"from_email", "value"=>"george.washington@klaviyo.com", "datatype"=>"string"}, {"name"=>"from_name", "value"=>"George Washington", "datatype"=>"string"}, {"name"=>"subject", "value"=>"Happy Fourth!", "datatype"=>"string"}, {"name"=>"to", "value"=>"[{\"name\":\"Abraham Lincoln\",\"email\":\"abraham.lincoln@klaviyo.com\"}]", "datatype"=>"string"}, {"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"}}