New "CTA" and "Topics" Properties in Get Blog Post API?


We noticed new properties “ctas” and “topics” in the Get Blog Posts API that showed up within the past few weeks. Is there a place where I can subscribe to, or view a list of change history to a given API endpoint?

In addition, it seems that the actual HTML for the get blog posts endpoint, within the post_body property now has some type of internal HubSpot Angular expression calling a javascript function called “cta”. Is this intentional? When I am displaying blog posts on my end it just looks like a GUID. Please let me know what we can do to get this to show up correctly, or exclude the CTA function.

For now I am cleaning up via simple regex.

Here’s an example: Why is this in the post_body property for the blog posts?



Something new about this?


Hi @simione,

There aren't any changes here; this is how HubSpot renders CTAs in blog posts. The cta() function is included as a HubL variable, and the CTA is substituted in when the page is rendered. If you're looking to strip these out, they will always have the same structure: {{cta(CTA-GUID)}}


And what about the "ctas" property in the Blog Post API? What is that?


Hi @simione,

The ctas property is a object with the cta guid(s) and cta definition(s) as key-value pairs. These definitions contain the HTML of the ctas, the image versions, and the relevant token. These values are used to replace the cta token based on context.

“CTA” Property in the Get Blog Post API?