Issues with consistency in hubspot-api-client

When designing custom code interactions with the hubspot API, I chose to use the hubspot-api-client for consistency.

I had multiple custom coded functions break because of an update in this package, where the naming convention of batch inserts changed from BatchInputSimplePublicObjectInputForCreate to BatchInputSimplePublicObjectBatchInputForCreate.

Even after discovering this issue, I am still noticing inconsistencies, where sometimes it seems to change between custom coded actions.
In my example, when I try to import and run the coded action locally, I get the message “BatchInputSimplePublicInputForCreate is unknown import symbol” and the code runs with an error.
It works when I change it to BatchInputSimplePublicBatchInputForCreate, but now I get the error in the coded action:
ERROR] Runtime.ImportModuleError: Unable to import module ‘hubspotHandler’: cannot import name ‘BatchInputSimplePublicObjectBatchInputForCreate’
This suggests the coded action has a different version of the hubspot-api-client package then I have locally. I am running 12.0.0.

Aside from this inconvenience, the biggest problem is inconsistency between custom coded actions. I have some custom coded actions running on BatchInputSimplePublicObjectInputForCreate and some on BatchInputSimplePublicObjectBatchInputForCreate, and all these functions would break if I would swap it around. I have the feeling my custom coded action running on the old spec (BatchInputSimplePublicObjectInputForCreate) could break anytime due to some slow roll-out of new package version.

@JVermunt - I knos this isn’t necessarily helpful, but after finding a number of these library issues over time, I defualt to the use of the base API calls whch are (nearly always) maintained stable over time.

Steve

It helps in making that decision as well, we will switch to base api calls going forward.

As always, your feedback and honesty are appreciated, @SteveHTM — Jaycee

Hi @JVermunt
This is a versioning and deployment issue in HubSpot, which is quite common. One approach which I can suggest to you is to use the REST API using fetch and axios as the endpoint rarely changes in HubSpot.
Here is the link to HubSpot docs - 2026-03 API reference - HubSpot docs
I hope this will help you out. Please mark it as Solution Accepted and upvote to help another Community member.
Thanks!

I couldn’t find the version initially, but I just noticed the environment runs on version 8, so I am using version 8.2.1 now locally.