# Associate Contact Record with Custom Object on POST Create

**URL:** <https://community.hubspot.com/t/associate-contact-record-with-custom-object-on-post-create/68349>\
**Category:** APIs & Integrations\
**Tags:** contacts\
**Created:** [November 1, 2022, 8:35pm UTC](https://community.hubspot.com/t/associate-contact-record-with-custom-object-on-post-create/68349 "2022-11-01T20:35:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![EBirdsall](https://avatars.discourse-cdn.com/v4/letter/e/b5ac83/32.png) [@EBirdsall](https://community.hubspot.com/u/EBirdsall)\
**Post date:** [November 1, 2022, 8:35pm UTC](https://community.hubspot.com/t/associate-contact-record-with-custom-object-on-post-create/68349/1 "2022-11-01T20:35:52Z")

</div>

I’m using the Hubspot API to create a Custom Object in Hubspot. This is working as intended. But I’d like to associate a Contact to the Custom Object. I see documentation on how to do this with the API as a seperate step- but I wasn’t sure if I could create the Custom Object **AND** create the association with one API call?  
Right now I pass a JSON object with the properties key to the

[https://api.hubapi.com/crm/v3/objects/:objectType](https://api.hubapi.com/crm/v3/objects/:objectType) endpoint via a POST.

I was wondering if I could add on an “associations” key to that JSON object to have the association be created at the same time as the custom object?

In my mind it would look something like this:

```lia-code-sample
const JSONtoPOST = {
 'properties': {
 'name': 'example'
 },
 'associations': {
 'contacts': {
 'results': [
 {
 'id': '12345678',
 'type': 'contact_to_custom_object',
 },
 ],
 },
 }
}

```

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 3, 2022, 4:32pm UTC](https://community.hubspot.com/t/associate-contact-record-with-custom-object-on-post-create/68349/2 "2022-11-03T16:32:14Z")

</div>

Hey, @EBirdsall 👋 Thanks for the question! You are not missing an avail be option. You’ll need to make two calls here. I agree, having an all-in-one option would be fantastic.

Have fun building! — Jaycee

---

<div class="post-metadata">

**Author:** ![zach\_threadint](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/zach_threadint/32/46318_2.png) [@zach\_threadint](https://community.hubspot.com/u/zach_threadint)\
**Post date:** [September 13, 2023, 12:05am UTC](https://community.hubspot.com/t/associate-contact-record-with-custom-object-on-post-create/68349/3 "2023-09-13T00:05:50Z")

</div>

Hi @EBirdsall [@Jaycee\_Lewis](https://community.hubspot.com/t5/user/viewprofilepage/user-id/127074)

I stumbled upon your question while providing support on a [recent related community post](https://community.hubspot.com/t5/APIs-Integrations/Is-it-possible-to-associate-a-record-with-a-custom-object-on/td-p/848291). As per my answer on the related post, it seems this is now possible 😄

Just thought I’d flag in case it’s still relevant for you.
