Design Studio emails
Preview an email
Returns an email with liquid fully evaluated against data you provide. The response includes the final HTML as a recipient would see it, along with liquid errors.
Omit the body or send {} to render your fallback values: a variable with a default filter renders its fallback, and each variable without one reports an error in the response's errors object.
The render, preview, review, link, and publish endpoints share a rate limit of 5 requests per second per workspace.
post/v1/design_studio/emails/{id}/preview
Path parameters
idstring uuid required
The UUID of the email. If your email has translations, this is the ID of a specific language variant.
Request body
Example request
{
"customer": {
"first_name": "Jane",
"email": "jane@example.com",
"plan": "enterprise"
},
"event": {
"name": "order_completed",
"total": 149.99
}
}Response
Successful response
Example response
{
"node_id": "1a0cbb4e-09d3-402e-949e-f6732f021650",
"node_type": "EMAIL",
"subject": "Order Confirmation",
"html": "<!DOCTYPE html>...<p>Purchase info</p>...",
"text": "<html><head></head><body style=\"margin:0\"><div style=\"font-size:16px;line-height:1.5;font-family:Arial,Helvetica,sans-serif;white-space:pre-wrap;padding:10px;\">Thanks for your recent purchase!</div></body></html>",
"plaintext_body": "Thanks for your recent purchase!",
"from": "\"No reply\" <noreply@example.com>",
"errors": {
"subject": [],
"body": [],
"body_amp": [],
"body_plain": [],
"from": [],
"reply_to": [],
"bcc": [],
"cc": [],
"to": [],
"preheader_text": [],
"layout": [],
"message": [],
"snippets": [],
"event": [],
"trigger": []
},
"links": [
{
"url": "https://example.com/orders",
"text": "View your order",
"tracked": true,
"errors": []
}
]
}Changes
Changed in 1 of the 13 revisions of this API.1
- ○
endpoint added
endpoint-added
- ○