Create Custom Objects in HubSpot using API with this easy Guide
Table of contents
An organization’s success is directly dependent on the way they represent and organize their data. It is evaluated that many successful organizations have a more streamlined and organized database. Thus, to help all types of businesses, HubSpot provides the ability to create custom CRM objects to define and manage their data more efficiently.
If you are a HubSpot Enterprise user, then you can surely leverage this feature of custom objects. Well! In HubSpot, there are four standard CRM objects, including tickets, deals, companies, and contacts.
Say if you want to create more properties that will allow you better manage your data, then defining a custom object via API is the only way to fulfill your goals.
But before we jump into the steps of creating a custom object in HubSpot, let’s first know about the importance of using custom objects in HubSpot.
People using custom objects can easily;
- Enroll records into workflows
- Personalize automated marketing emails
- Report on custom object records
Are you excited about creating custom objects for your business? Now, let’s learn how it actually works.
Steps to create Custom Objects in HubSpot using API
Let’s get started…
Note- To get started with the creation of custom objects in HubSpot, it is vital to have a HubSpot key.
How to get the HubSpot key?
Follow the steps below to get the HubSpot key.
- Step-1 Navigate to the settings.

- Step-2 Select the API key from the sidebar. Copy this API if created; if not, then create and copy HubSpot API key for permission of API.

Code with Request and Response
Once you get the API key, it’s time to create a custom object in HubSpot using API code. If you need to automate data extraction to integrate with your HubSpot CRM, Apify can simplify the process
- Step-3 The code added below will help you to create custom objects easily. In this code, I have named the key as “custom_users.” But you can change the name as per your open requirements.
The name and key are “custom_users.” If you don’t have any requirements, then you can also use this key. This code is created in PHP, and the method used is POST
Have a look at the below Curl Request-


- Step-4 Once you run this code, you will get the response as shown in the below-added screenshot-

- Step-5 If you redirect to a similar page, then it means that you have successfully created a custom object in HubSpot. Have a look at the below screenshot-

- Step-6 With the help of creating custom_users, you can create any user. In the code shared above, I have listed Name, Gender, and Email property, just as shown below. Here you can add more properties in POST requests.

Note- Many of you might be wondering about the association. The good news here is that you don’t need to perform extra steps. When you run the above code of API, the association will be done automatically.

- Step-7 Now, if you want to get the entire data definition of custom object schema, then using the below code will help you succeed.
With this PHP code, you can get the custom object layout to get more details.
Method- GET
Curl Request-

- Step-8 Once you run this code, you will get an output as shown below-

- Step-9 Now, if you want to update the custom objects such as name, gender, etc., or want to add more fields, then you can use the below URL request.
Here, the method used is PATCH.
Here, you have to use your own portal ID and the name of your custom object.
Curl Request:

- Step-10 Many times, we are in a situation where we want to delete a custom object. For deletion, you can use the below code, which is written in PHP.
Here the method used is DELETE.
Curl request-

How to create Association Definition?
- Step-11 Usually, the above code will automatically associate each property. But if you want to associate another property that is not listed in the above code, then the below URL request will allow you to proceed further.
The below code is created using PHP, and the method here is- POST.
Make sure you use your own portal ID.
Curl request:

How to create an Association to an object Instance?
- Step-12 If you want to associate with different objects, then you can use the below API, where you have to use your own portal ID and custom object name.
Here the method used is POST.
Curl Request:


Note– Many times; people don’t know where to find the custom object ID. Well! You can refer to the below screenshot to know where you can get this ID.

Read more about- How to use HubSpot contact API.
Final Thoughts
It’s well said that” Custom objects are a game-changer. They provide the flexibility to store any kind of data in HubSpot, maintaining all of the power and ease-of-use that teams need to scale and grow.”
Well! Creating custom objects in HubSpot is not easy, but hopefully, the above steps will help you in creating custom objects in HubSpot using API without any hassle. By following each point and exact code, you can easily create custom objects for your unique business case.
Still, if you face any challenges in creating custom objects in HubSpot, feel free to reach us.
Editor– Divya Verma
Frequently Asked Questions
How do you Create a custom object in HubSpot?
What are the object types in HubSpot API list?
What are custom objects used for in HubSpot?
Can you map custom object data to HubSpot?
Dive Into our Client Testimonials
Listen to business owners like you share how we’ve helped them grow. Your story could be next!
The webdew team is very supportive, they provide us with thoughtful suggestions.
We contracted webdew to build our new website. And let me tell you, they did a fantastic job. Their team was really easy to communicate with.”
The webdew team is very supportive, they provide us with thoughtful suggestions.
We contracted webdew to build our new website. And let me tell you, they did a fantastic job. Their team was really easy to communicate with.”
The webdew team is very supportive, they provide us with thoughtful suggestions.
We contracted webdew to build our new website. And let me tell you, they did a fantastic job. Their team was really easy to communicate with.”
“We worked with Chehak over the past several months to create a series of animated videos for an academic planner that we produce. And from the very beginning, she was absolutely professional and a pleasure to work with.”
6x
We helped clients multiply their website conversion rates through strategic design and UX optimization.
20%
Our marketing campaigns led to a 20% uplift in customer engagement across digital channels.
2K+
Delivered over 2,000 qualified leads through targeted funnels and smart automation.
120+
Our video content has earned 120,000+ views, driving brand awareness and audience retention.
“I recently had the pleasure of working with Chehak on a video demo project, and I was thoroughly impressed with her services.”
Additional Resources
Access expert tips, trends, and strategies designed for small businesses. Stay ahead of the curve and make informed decisions with our comprehensive resources!