# Create Primary Contact Association

**URL:** <https://community.hubspot.com/t/create-primary-contact-association/77619>\
**Category:** APIs & Integrations\
**Tags:** starter\
**Created:** [March 21, 2023, 12:10pm UTC](https://community.hubspot.com/t/create-primary-contact-association/77619 "2023-03-21T12:10:45Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lyndwode](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Lyndwode](https://community.hubspot.com/u/Lyndwode)\
**Post date:** [March 21, 2023, 12:10pm UTC](https://community.hubspot.com/t/create-primary-contact-association/77619/1 "2023-03-21T12:10:45Z")

</div>

I am not a developer, but working with a team of devs internally. We are creating Contacts in Hubspot via the API and associating them with existing Companies with the following call:

put

/crm/v3/objects/contacts/{contactId}/associations/companies/{companyId}/1

This should set the association to primary with the associationTypeId = 1.

As documented here:

> **[Accounts Dashboard | HubSpot](https://app.hubspot.com/myaccounts?next=developerdocs&redirect=%2Fapi-reference%2Fcrm-contacts-v3%2Fguide)**

However, if the Contact’s email domain does not match the one on the Company, Hubspot’s automatic association will ALSO create another Company and connect the Contact to that Company as the PRIMARY association.

We need to avoid this at all cost as we have other processes which depend on the correct associationTypeId.

Thanks in advance!

Andrew

---

<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:** [March 21, 2023, 8:05pm UTC](https://community.hubspot.com/t/create-primary-contact-association/77619/2 "2023-03-21T20:05:22Z")

</div>

Heyo @Lyndwode !

I would make sure that the toggle is switched off on your portal for automatically associating contacts to company based on email address. I do not recall if this is on by default or not, but this would be where I would start  
Here is the [knowledge base article](https://knowledge.hubspot.com/crm-setup/automatically-create-and-associate-companies-with-contacts#turn-on-automatic-association-between-contacts-and-companies) on the topic for some light evening reading 😀

---

<div class="post-metadata">

**Author:** ![Lyndwode](https://avatars.discourse-cdn.com/v4/letter/l/ec9cab/32.png) [@Lyndwode](https://community.hubspot.com/u/Lyndwode)\
**Post date:** [March 23, 2023, 10:17am UTC](https://community.hubspot.com/t/create-primary-contact-association/77619/3 "2023-03-23T10:17:56Z")

</div>

Thanks @dennisedson ! However, the customer we are working with wants this toggle enabled in general. I also suggested this to them as the first solution 🙂 I will run it by them again!

---

<div class="post-metadata">

**Author:** ![DavidVoigt](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/davidvoigt/32/47231_2.png) [@DavidVoigt](https://community.hubspot.com/u/DavidVoigt)\
**Post date:** [March 27, 2023, 8:45am UTC](https://community.hubspot.com/t/create-primary-contact-association/77619/4 "2023-03-27T08:45:02Z")

</div>

1. create the contact without email address
2. create the contact-company association
3. add email address to the contact

Would this work?
