HubSpotCRM custom object objectType

Our team is working on a HubSpotCRM connector, adding support for custom objects. To perform basic API operations for custom objects, we need a consistent objectType value for the API endpoint URLs (eg. https://api.hubapi.com/crm/v3/objects/{objectType}/{objectId}) that won’t change as we move between different environments (e.g. staging, production, etc.).

We’ve explored several options and believe that using a prefix like “p_” on the custom object’s name will generate a stable objectType that remains consistent across all our environments.

We’d greatly appreciate any confirmation or insights from the community on whether this is a reliable and recommended approach. Are there any potential issues or alternative best practices we should be aware of?

Hi @Prateek_Boomi and thank you for bringing such a thoughtful question to the HubSpot Community! :orange_heart:

Firstly, it’s awesome that your team is working on a HubSpot CRM connector with custom object support, this kind of extensibility is what makes the platform so powerful.
For reference, here is the documentation about it “Custom objects API guide”.
Now, let’s consult with our Top Experts: Hi @sylvain_tirreau, @Anton and @MichaelMa do you have suggestions to help @Prateek_Boomi, please?
Have a great day and thanks so much!
Bérangère

As long as the object’s internal name/slug is the same in all the systems then yes, you can access the custom object with p_{internal_name}. Eg, p_account_teams. The labels can be chcanged but the internal name is locked once the object is created.

If nothing else, you can use the same notation to pull the schema to get the object id which you can also use.

Since API v3, I’ve used the p_{internal_name} format for all my API calls and haven’t had any issues with it.