Skip to main content

I am trying to figure out the following problem:
- I have created a HTML-Template via API which is a code-only template ( stored the reference ID )
- Now I update the contents of it with freshly generated html via API( working fine )
- Finally I am going to check if the preview is loaded correctly and check the results with a testing profile. Right here I am stuck. There’s no preview generated anymore, if I selected a profile which includes the necessary properties for testing I also don’t get a preview. It just shows me a white page.

Fun fact, if I save the template via editor once without changing the code, the preview is then working perfectly again.

 

Is anyone able to provide me a solution?

Thanks in Advance!

Hi ​@jhorngacher ! Thank you for reaching out to Community, and sorry to hear you’re having issues previewing your HTML email template. 

To clarify, when you preview the email in Klaviyo is it just showing as a blank screen? And then once you save the template and go back to preview, it then shows? 


Hi ​@emma.owens!
Exactly, I’ve already found the issue. I forgot to have enclosing <html>and <body>  tags. 
So for anyone having the same struggle put inside the payload of the html-content a starting <html> and <body> tag and u’re good-to-go

<html>
<body>
your additonal code goes here
</body>
</html>