N
Novu2d ago
Endy_

Showing preview email in frontend

I found the endpoint
v1/content-templates/preview/email
v1/content-templates/preview/email
on the Novu website, which returns the email template with variable content. Is there an API endpoint available that returns the HTML to my frontend for preview purposes?
6 Replies
Pawan Jain
Pawan Jain2d ago
@Endy_ Currently, we don't have a public api for this. Could you please share your usecase on this?
HTML to my frontend for preview purposes
Endy_
Endy_OP2d ago
I am using React Email Editor to allow users to build their email templates. I want to show them what the email looks like before they confirm, including variables, loop, etc. Just like the workflow email preview function in Novu.
Pawan Jain
Pawan Jain2d ago
@Endy_ react email provides preview component https://react.email/docs/components/preview
Endy_
Endy_OP2d ago
Would you consider making the
v1/content-templates/preview/email
v1/content-templates/preview/email
endpoint available via API-key access? I’ve tried calling it with my API key, but it currently works only with a web token. That is exactly the functionality I need, yet I’m unable to invoke it using my API key.
Pawan Jain
Pawan Jain2d ago
Yes, it is private api endpoint. I will share the feedback with team on making this public I will reach out for any follow up question
Endy_
Endy_OP2d ago
Many thanks

Did you find this page helpful?