# Create a custom module that updates a HubDB table

**URL:** <https://community.hubspot.com/t/create-a-custom-module-that-updates-a-hubdb-table/97363>\
**Category:** APIs & Integrations\
**Tags:** companies\
**Created:** [January 8, 2024, 7:46pm UTC](https://community.hubspot.com/t/create-a-custom-module-that-updates-a-hubdb-table/97363 "2024-01-08T19:46:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AMastoris](https://avatars.discourse-cdn.com/v4/letter/a/bb73d2/32.png) [@AMastoris](https://community.hubspot.com/u/AMastoris)\
**Post date:** [January 8, 2024, 7:46pm UTC](https://community.hubspot.com/t/create-a-custom-module-that-updates-a-hubdb-table/97363/1 "2024-01-08T19:46:35Z")

</div>

I have a module that prompts the user with questions step by step and I want to save their answers in a hubdb table. Am I able to access the CMS API through a custom module using a javascript curl request? Or is their a better way to do it?

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [January 9, 2024, 4:38pm UTC](https://community.hubspot.com/t/create-a-custom-module-that-updates-a-hubdb-table/97363/2 "2024-01-09T16:38:50Z")

</div>

Hi, @AMastoris 👋 Thanks for your question.

I’d recommend looking into utilizing Serverless Functions if you have access. Or researching setting up some form of middleware. My main concerns with doing this client-side are:

- Security — you risk exposing your API or Private App keys by making calls client-side (from your module in this case) — [Include serverless functions in projects (BETA)](https://developers.hubspot.com/docs/platform/serverless-functions) and [Serverless functions](https://developers.hubspot.com/docs/cms/data/serverless-functions)
- CORS restrictions — HubSpot may block your cross-origin requests
- Rate limiting and performance — if multiple users are interacting with your application simultaneously, you may hit rate limits. Managing this server-side allows you more flexibility and control over how the calls are sent

Have fun building! — Jaycee
