# Looking for Email Preview Url or Content HTML

**URL:** <https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [March 18, 2021, 7:08pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131 "2021-03-18T19:08:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![WPSupport](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wpsupport/32/18373_2.png) [@WPSupport](https://community.hubspot.com/u/WPSupport)\
**Post date:** [March 18, 2021, 7:08pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131/1 "2021-03-18T19:08:20Z")

</div>

As part of my product’s marketing integration, we display the content of marketing emails sent out to contacts. I found the email api endpoint that returns a list of widgets as well as the layout of the widgets in the email, however Im not trying to build a custom renderer based on these objects. Is there a way to get the html (or even a url) from the preview screen on the portal?

Thank you,

Josh

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [March 19, 2021, 7:22pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131/2 "2021-03-19T19:22:18Z")

</div>

Hi @WPSupport

To be honest, I am not 100% following the question 😬. And there is a good chance that this is me on a Friday with a fried brain. Could you ellaborate?

Because there is a large possibility that it is just me being fried, will add a few people to the thread in hopes that they are better off 😀

[@quentin\_lamamy](https://community.hubspot.com/t5/user/viewprofilepage/user-id/148828) , @lynton if you all feel like saving me, go for it 👍

---

<div class="post-metadata">

**Author:** ![WPSupport](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wpsupport/32/18373_2.png) [@WPSupport](https://community.hubspot.com/u/WPSupport)\
**Post date:** [March 19, 2021, 8:12pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131/3 "2021-03-19T20:12:51Z")

</div>

Hey Dennis, I completely relate to the Friday afternoon feeling 😁.

To elaborate on my situation: I have a CRM product that directly integrates with the Hubspot API by pushing contacts, maintaining list membership, and tracking email history. As part of my product, we show a list of emails that have been sent to an associated contact. For other marketing platforms that we integrate with, I am able to get either a link or the html for each email that was sent so that I can display at least a preview of the message. I’m trying to re-create this functionality for our Hubspot subscribers.

I have found two things so far. The first is the email api endpoint (GET /marketing-emails/v1/emails/:id). I could not find a valid url or html blob that I could use in the response object. What I did find were the widget and layout objects, however, I would have to build a custom renderer to be able to recreate what an email actually looks like from this information. The second thing I found was the ‘preview’ feature that exists within the Hubspot website when viewing an email as an administrator. The external url looks something like this: '[https://preview.hs-sites.com/\_hcms/preview/content/42514309390?portalId=9481732&\_preview=true&cacheBust=0&preview\_key=HbmJBnAP&from\_buffer=false’](https://preview.hs-sites.com/_hcms/preview/content/42514309390?portalId=9481732&_preview=true&cacheBust=0&preview_key=HbmJBnAP&from_buffer=false') however I believe the preview\_key is generated on the server so its not possible for me to create this url by hand.

Just looking for some guidance on how to show a preview of emails that are being sent.

Thank you for your help and happy Friday!

Josh

---

<div class="post-metadata">

**Author:** ![SCary3](https://avatars.discourse-cdn.com/v4/letter/s/db5fbb/32.png) [@SCary3](https://community.hubspot.com/u/SCary3)\
**Post date:** [May 8, 2024, 4:03pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131/4 "2024-05-08T16:03:02Z")

</div>

Hi for those still searching it looks like this is available in the the legacy API. [https://legacydocs.hubspot.com/docs/methods/lists/marketing-email-overview](https://legacydocs.hubspot.com/docs/methods/lists/marketing-email-overview)

There is a field called “previewKey” that could be used to build the external URL like  
https:// **YOUR\_PORTAL\_ID**.hubspotpreview-na1.com/\_hcms/preview/email/ **EMAIL\_ID**?portalId= **YOUR\_PORTAL\_ID** &preview\_key= **previewKey** &\_preview=true&from\_buffer=false&cacheBust=0&hsPreviewerApp=email

---

<div class="post-metadata">

**Author:** ![Marsharks](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/marsharks/32/90409_2.png) [@Marsharks](https://community.hubspot.com/u/Marsharks)\
**Post date:** [February 26, 2022, 1:54pm UTC](https://community.hubspot.com/t/looking-for-email-preview-url-or-content-html/34131/5 "2022-02-26T13:54:54Z")

</div>

I just was searching for the same thing and saw this unanswered post. Any update to the answer to the question?
