Way to add Custom Modules in CMS via API?

Hello,

I am an an App developer, and am trying to undertand how “Custom Modules” are populated, and if they can be updated via the Hubspot CMS API.

When I create a test site, “Custom Modules” is populated with elements such as “Vast FAQ” and “Vast Scroll to Top”…

This kind of flow is ideal for our Apps, as it is a simple drag & drop for the user.

I’m curious how these came to be included by default, and if there is any possibility of us having a flow similar to this? From what I’ve seen there is no documentation around programmatically creating custom modules via the API. Appreciate any insight!

Cheers

hey @code4u ! We don’t currently have an API for Custom Modules. The Vast theme is just what we provide all accounts with by default so they can get started with some simple landing pages and explore the CMS. We are planning on releasing an API for Custom Modules very soon, so I’d keep an eye out for that at the moment. You can still use all of our other CMS APIs, however, if you’d like to create templates or pages with the API.

Hey Connor,

Ok, thanks for the clarification. What is the best way to be notified when the API for Custom Modules is released?

Cheers

code4u

hi @code4u, any changes or additions to our APIs would be posted in the changleog: HubSpot Developer Changelog which you can subscribe to

Are there any updates on this matter? We’d also love to see that coming ;-).

You can just send POST request:
POST: https://api.hubapi.com/content/api/v4/custom-widgets/?hapikey=YOUR-KEY
BODY:
{
“name”: “nameOfCustomModule”,
“fields”:[],
“source”:“<h1>Hello world!</h1>”
}

Is there any documentation about Custom Widgets or V4?