# Custom modules API

**URL:** <https://community.hubspot.com/t/custom-modules-api/77837>\
**Category:** APIs & Integrations\
**Tags:** email\
**Created:** [March 23, 2023, 1:56pm UTC](https://community.hubspot.com/t/custom-modules-api/77837 "2023-03-23T13:56:43Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![MBos](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@MBos](https://community.hubspot.com/u/MBos)\
**Post date:** [March 23, 2023, 1:56pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/1 "2023-03-23T13:56:43Z")

</div>

Hi,

Is there an API for programmatically uploading custom (email) modules?

Thanks,

Max

---

<div class="post-metadata">

**Author:** ![Henrik\_B\_Stein](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/henrik_b_stein/32/44735_2.png) [@Henrik\_B\_Stein](https://community.hubspot.com/u/Henrik_B_Stein)\
**Post date:** [March 23, 2023, 3:29pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/2 "2023-03-23T15:29:36Z")

</div>

Hi MBos,  
I think what you are looking for is the [hubspot-cli](https://developers.hubspot.com/docs/cms/developer-reference/local-development-cli). Follow the instructions for “Install”, "Upgrade, “init” and then “upload” or "watch. An example of this can be found [here](https://developers.hubspot.com/docs/cms/guides/getting-started?hsCtaTracking=28bfd0e9-ec05-48a5-b069-ce20015f54ac%7Cc66b91fb-14b1-4c35-ab0d-7e4af8000592). Let me know if this helps! If you’re having trouble setting up your hubspot-cli, feel free to reach out!  
Best regards,  
Henrik Bartenstein

---

<div class="post-metadata">

**Author:** ![MBos](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@MBos](https://community.hubspot.com/u/MBos)\
**Post date:** [March 23, 2023, 3:34pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/3 "2023-03-23T15:34:14Z")

</div>

Hi Henrik,

Thank you for your help, but it’s a different kind of module I’m after. Sorry for not being too clear in my first post, but with email modules I mean the kind that you can use in HubSpot’s email editor as building blocks, these: [https://developers.hubspot.com/docs/cms/building-blocks/modules/files.](https://developers.hubspot.com/docs/cms/building-blocks/modules/files)

Max

---

<div class="post-metadata">

**Author:** ![Henrik\_B\_Stein](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/henrik_b_stein/32/44735_2.png) [@Henrik\_B\_Stein](https://community.hubspot.com/u/Henrik_B_Stein)\
**Post date:** [March 23, 2023, 3:47pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/4 "2023-03-23T15:47:23Z")

</div>

Hey Max,  
I actually meant the same kind of modules, respectively almost any kind of files you want to upload to you design tools. You can just navigate to your project-folder or the folder where your module is stored, open a terminal and use the CLI to upload your files. If your custom module is structured like the one in the second screenshot [Coding Custom Modules - HubSpot docs](https://developers.hubspot.com/docs/cms/building-blocks/modules/files), it will appear as a module in the design manager.  
Best regards,  
Henrik

---

<div class="post-metadata">

**Author:** ![MBos](https://avatars.discourse-cdn.com/v4/letter/m/a3d4f5/32.png) [@MBos](https://community.hubspot.com/u/MBos)\
**Post date:** [March 23, 2023, 4:12pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/5 "2023-03-23T16:12:59Z")

</div>

Oh interesting, thanks! The CLI solution unfortunately wouldn’t work for our use case.

We namely want to be able to programmatically upload custom modules using the HubSpot API to the accounts of our users that use our HubSpot integration (it’s available on the HubSpot app marketplace). Do you know if there is a similar solution available for use of the HubSpot API?

---

<div class="post-metadata">

**Author:** ![Henrik\_B\_Stein](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/henrik_b_stein/32/44735_2.png) [@Henrik\_B\_Stein](https://community.hubspot.com/u/Henrik_B_Stein)\
**Post date:** [March 23, 2023, 4:29pm UTC](https://community.hubspot.com/t/custom-modules-api/77837/6 "2023-03-23T16:29:28Z")

</div>

Hey MBOS,  
In that case, you can make your files available to the customer in their app settings. [Create a settings page for a legacy public app - HubSpot docs](https://developers.hubspot.com/docs/api/create-an-app-settings-page)  
Henrik
