# Add association while adding a new hubspot object entry

**URL:** <https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875>\
**Category:** APIs & Integrations\
**Tags:** object, contacts\
**Created:** [May 25, 2021, 3:35pm UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875 "2021-05-25T15:35:49Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![hari0](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hari0/32/22307_2.png) [@hari0](https://community.hubspot.com/u/hari0)\
**Post date:** [May 25, 2021, 3:35pm UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/1 "2021-05-25T15:35:49Z")

</div>

Is there any option to pass the associations while creating a HubSpot object entry

Eg: Add association to a company while creating a new deal entry.

There are separate APIs given in the API documentation for creating an object and then adding an association for that object. But it will be great if this can be done with a single API. As then a single API can be used and it will also simplify the retry policies.

---

<div class="post-metadata">

**Author:** ![dennisedson](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/dennisedson/32/28044_2.png) [@dennisedson](https://community.hubspot.com/u/dennisedson)\
**Post date:** [May 25, 2021, 8:49pm UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/2 "2021-05-25T20:49:08Z")

</div>

@zaklein , what are your thoughts here 😀

---

<div class="post-metadata">

**Author:** ![zaklein](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zaklein/32/44431_2.png) [@zaklein](https://community.hubspot.com/u/zaklein)\
**Post date:** [May 26, 2021, 9:37am UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/3 "2021-05-26T09:37:41Z")

</div>

Hi @hari0

Unfortunately not. As far as I’m aware (I could be wrong), no resources available under [HubSpot’s CRM API](https://developers.hubspot.com/docs/api/crm/understanding-the-crm) allow for association at the same time as record create/update.

The 1 exception within HubSpot’s API ecosystem I’m aware of exists in [Ecommerce Bridge](https://developers.hubspot.com/docs/api/marketing/ecomm-bridge). With Ecommerce Bridge, it is possible to create/update a record while associating it with other records in 1 call. However, obviously this will likely only be a viable option if you’re working with e-commerce data.

All the best,

Zach

---

<div class="post-metadata">

**Author:** ![hari0](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hari0/32/22307_2.png) [@hari0](https://community.hubspot.com/u/hari0)\
**Post date:** [May 26, 2021, 9:56am UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/4 "2021-05-26T09:56:12Z")

</div>

Hi @zaklein ,

Thanks for the reply, I couldn’t find any way either from the API specifications.

Regards Hari

---

<div class="post-metadata">

**Author:** ![system](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/system/32/124_2.png) [@system](https://community.hubspot.com/u/system)\
**Post date:** [May 28, 2021, 10:00am UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/5 "2021-05-28T10:00:21Z")

</div>

Hi @hari0 ,

Webdew :  
No, you don’t have to do this with single api of these object. You have to use both api’s, for object create “[https://legacydocs.hubspot.com/docs/methods/contacts/create\_contact](https://legacydocs.hubspot.com/docs/methods/contacts/create_contact)” for association use “[https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects](https://legacydocs.hubspot.com/docs/methods/crm-associations/associate-objects)”  
Hope this helps!  
If we were able to answer your query, kindly help the community by marking it as a solution.  
Thanks and Regards.

---

<div class="post-metadata">

**Author:** ![hari0](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/hari0/32/22307_2.png) [@hari0](https://community.hubspot.com/u/hari0)\
**Post date:** [May 28, 2021, 10:16am UTC](https://community.hubspot.com/t/add-association-while-adding-a-new-hubspot-object-entry/37875/6 "2021-05-28T10:16:15Z")

</div>

Hi [@webdew](https://community.hubspot.com/t5/user/viewprofilepage/user-id/131510) ,

Thanks for the reply.

I think i didn’t convey the intent behind the question properly.

Yes, I know that we can create an object with an API call and then use another to create the associations.

What I was asking was whether this was possible with a single API call. This way we can reduce the overall calls to HubSpot and also simplify error management for the caller, say when just the first call was a success and subsequent ones a failure.

Thanks

Hari
