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; 

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.

  • 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

In HubSpot, creating a custom object involves manually adding a record. First, go to Contacts > Custom Objects in your HubSpot account, and choose the specific object for which you want to create a record. Then, click the “Create [custom object]” button at the upper right. In the right panel, you can enter the necessary property values and choose records to link with your new entry. This process allows you to create and manage custom records tailored to your specific needs within the HubSpot platform.

HubSpot API uses object types to organize data. In every HubSpot account, there are four basic objects: contacts (individuals), companies, deals (sales opportunities), and tickets (customer service requests). These objects help businesses manage and interact with their customers effectively. Contacts store information about people, companies represent organizations, deals track potential sales, and tickets handle customer support inquiries. Using HubSpot's API, developers can work with these objects to integrate, manipulate, and extract data, enabling better customer relationship management and business operations.

In HubSpot, custom objects are like your personal filing cabinets. They let you make special places to keep unique info in ways that suit you best. You can organize and store data just the way you want. It's all about making HubSpot work perfectly for your specific needs and data, like having your own tailor-made shelves for your stuff. Custom objects help you make HubSpot uniquely yours!

To map custom object data to HubSpot, first, set up a custom object sync. Once that's done, you can bring existing custom object data from Salesforce into HubSpot. In your HubSpot account, go to Contacts > Contacts, and then click “Import” in the upper right corner. Follow this by clicking “Start Import” to initiate the process. This will help you seamlessly transfer your custom object data and integrate it within your HubSpot account.