Questions Regarding API Functionality for Custom Objects in HubSpot

Hello everyone,

I am reaching out with some questions regarding the API functionality for custom objects in HubSpot. Specifically, I have created a custom object called “appointments” and am now attempting to write a Python program utilizing the HubSpot API client to create meetings in batch for this custom object. However, I have encountered the following issues:
1.) AssociationTypeId for Custom Objects and Meetings
I am unable to find the associationTypeId for linking the custom object to meetings. This information does not seem to be available in the API documentation or within my account.
In the settings, I can set associations with limited CRM objects, such as contacts, tickets, or other custom objects. However, this does not seem to extend to meetings, which is required for batch creation.
2.) Unexpected Results for AssociationTypeId
When attempting to retrieve the associationTypeId via a read HTTP request, the response I received was as follows:
“meetings”: {
“paging”: null,
“results”: [
{“id”: “XXXXXXXXXXX”, “type”: “appointments_to_meeting_event”}
]
}
The associationTypeId/type appears as a string in the response, whereas I was expecting a numeric value. Could you clarify this discrepancy?
3.) Assigning Multiple Users as Attendees
When creating a meeting using the HubSpot Meeting tool, it is possible to assign multiple users (not contacts) as attendees. However, I could not find any reference to this functionality in the API documentation. Could you provide guidance on which properties to use to achieve this and where to find the corresponding IDs for the users I wish to assign as attendees?
Thanks!

Hi @DSushko,

I think you’ll want to use the Engagements API to associate your meetings to the custom object. Here’s an example:

{
 "engagement": {
 "type": "MEETING"
 },
 "associations": {
 "contactIds": [],
 "companyIds": [],
 "dealIds": [],
 "ownerIds": [],
 "customObjectIds": {
 "appointments": ["YOUR_CUSTOM_OBJECT_RECORD_ID"]
 }
 },
 "metadata": {
 "title": "Meeting Title",
 "startTime": 1622548800000,
 "endTime": 1622552400000,
 "body": "Meeting Description"
 }
}

The API will return a string-based identifier vs numeric. Try this:

{
 "from": { "id": "YOUR_CUSTOM_OBJECT_RECORD_ID" },
 "to": { "id": "MEETING_ID" },
 "type": "appointments_to_meeting_event"
}

Lastly, you should be able to assign internal attendees using “hs_meeting_internal_attendees” and separating each user ID for the internal attendee with a semicolon.

Hope this puts you on the right track!

Josh

@DSushko - This is a confusing part of teh associations documentation, but the API call you want to use to dynamically discover all possible association values between two object types is:

https://api.hubapi.com/crm/v4/associations/{fromObjectType}/{toObjectType}/labels

custom objects, with their own freshly minted type, will not be in teh documentation list!

Have fun!

Steve

Thanks for the quick response! I see, with this command I actually got a typeID which is a needed associationTypeId, right? Any chance that you know how assigning multiple users as attendees via API works? Thanks a lot in advance!