# Associate custom object to contact

**URL:** <https://community.hubspot.com/t/associate-custom-object-to-contact/69938>\
**Category:** APIs & Integrations\
**Created:** [November 24, 2022, 3:02pm UTC](https://community.hubspot.com/t/associate-custom-object-to-contact/69938 "2022-11-24T15:02:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![TZiesing](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/tziesing/32/54294_2.png) [@TZiesing](https://community.hubspot.com/u/TZiesing)\
**Post date:** [November 24, 2022, 3:02pm UTC](https://community.hubspot.com/t/associate-custom-object-to-contact/69938/1 "2022-11-24T15:02:41Z")

</div>

Hi there, I am trying to set up an association between contact and custom object but I am wondering what the right “objecttype” would be? I assumed it would be the name of the custom object but it gives me an error.

Does anyone has a hint what I am doing wrong in this regard?

Thanks

---

<div class="post-metadata">

**Author:** ![samrong\_tee](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/samrong_tee/32/103426_2.png) [@samrong\_tee](https://community.hubspot.com/u/samrong_tee)\
**Post date:** [November 25, 2022, 8:45am UTC](https://community.hubspot.com/t/associate-custom-object-to-contact/69938/2 "2022-11-25T08:45:09Z")

</div>

Hi TZiesing,

The Object type actually is the Custom Object Type ID. we can find from the Hubspot URL:

For example, navigate to Contacts \> Custom Objects  
In the Custom objects page click one of the object item it will redirect to this URL:

> **[HubSpot](https://app.hubspot.com/contacts/23345688/record/2-8142271/3265131140/)**

23345688 is Instance ID  
2-8142271 is Object type ID (this is the object type ID you are looking for)  
3265131140 is Object ID

here is the example of request values for Association endpoint:  
{  
fromObjectType: ‘contact’,  
fromObjectId: ‘6334451’,  
toObjectType: ‘2-8142271’,  
toObjectId: ‘3265131140’,  
relationship: ‘contact\_to\_custom\_object’  
}

hope can solve your issue.
