# Create Engagement API

**URL:** <https://community.hubspot.com/t/create-engagement-api/61444>\
**Category:** APIs & Integrations\
**Created:** [July 21, 2022, 3:14pm UTC](https://community.hubspot.com/t/create-engagement-api/61444 "2022-07-21T15:14:33Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PJha9](https://avatars.discourse-cdn.com/v4/letter/p/9f8e36/32.png) [@PJha9](https://community.hubspot.com/u/PJha9)\
**Post date:** [July 21, 2022, 3:14pm UTC](https://community.hubspot.com/t/create-engagement-api/61444/1 "2022-07-21T15:14:33Z")

</div>

Hi I am creating a meeting between the 2 contacts and while creating I am not passing any deal\_ids with associations but still, it creates the multiple deal\_ids in the associations.  
for example, X books a meeting with Y and when I call the API to create the meeting I don’t see any deal association made through API but when I check the UI I see that there are 5 deals associated with meeting and those 5 deals are of Y’s last 5 deals with other contacts.  
here’s the Hubspot response which I got when created the meeting through API.  
{  
“associationCreateFailures”:[  
],  
“engagement”:{  
“id”:23761526161,  
“portalId”:7172738,  
“active”:true,  
“createdAt”:1658330240907,  
“lastUpdated”:1658330240907,  
“ownerId”:0012300,  
“type”:“MEETING”,  
“uid”:“70r2kc2hjhyjkrfxif”,  
“timestamp”:1658331000000,  
“allAccessibleTeamIds”:[  
],  
“bodyPreview”:“no description”,  
“queueMembershipIds”:[  
],  
“bodyPreviewIsTruncated”:false,  
“bodyPreviewHtml”:“\<html\>\n \<head\>\</head\>\n \<body\>\n no description\n \</body\>\n\</html\>”  
},  
“associations”:{  
“contactIds”:[  
2851,  
8501  
],  
“companyIds”:[  
],  
“dealIds”:[  
],  
“ownerIds”:[  
],  
“workflowIds”:[  
],  
“ticketIds”:[  
],  
“contentIds”:[  
],  
“quoteIds”:[  
]  
},  
“attachments”:[  
],  
“scheduledTasks”:[  
],  
“metadata”:{  
“startTime”:1658331000000,  
“endTime”:1658331900000,  
“title”:“Referral Meeting”,  
“body”:“no description”,  
“source”:“CRM\_UI”,  
“preMeetingProspectReminders”:[  
],  
“meetingOutcome”:“SCHEDULED”,  
“attendeeOwnerIds”:[  
]  
}  
}

 ![PJha9_0-1658416423950.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/4/14d5b41bacd2482530547e8e16ac0d45304a0e27.png)

Can anyone please tell me what exactly is happening here.

---

<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:** [July 22, 2022, 5:16pm UTC](https://community.hubspot.com/t/create-engagement-api/61444/2 "2022-07-22T17:16:24Z")

</div>

Hey, @PJha9 👋 To clarify, this is the expected behaviour. Activities, including meetings, for Contacts will _always_ be associated with the 5 most recent _open_ deals. This knowledge base article covers the underlying logic — [Associate activities with records.](https://knowledge.hubspot.com/crm-setup/associate-activities-with-records#automatic-activity-association)

This is not something that can be changed, as it is built into the tool. If you have a moment, I found this recent Ideas thread requesting the ability to control this automatic association behaviour — [Choose to allow automatic association of activities between records.](https://community.hubspot.com/t5/HubSpot-Ideas/Choose-to-allow-automatic-association-of-activities-between/idi-p/408746)

Best,

Jaycee
