To use fields with data types, such as array, boolean, double, or integer, you must use annotations as shown in the following sample code:
- •The Get Object action retrieves multiple records for the specified entity type.
You must specify the path parameters for the objects that you want to retrieve. Additionally, provide values for the queryParameters field, if required.
Example: Getting contacts
The following snippet is a sample input for the pathParameters field:
<root>
<pathParameter>crm</pathParameter>
<pathParameter>v3</pathParameter>
<pathParameter>objects</pathParameter>
<pathParameter>contacts</pathParameter>
</root>
The following snippet is a sample response body:
<root>
<results>
<createdAt>2025-08-14T07:37:29.965Z</createdAt>
<archived>false</archived>
<id>404861480135</id>
<url>https://app-eu1.hubspot.com/contacts/146727578/record/0-1/404861480135</url>
<properties>
<firstname>Maria</firstname>
<lastmodifieddate>2025-08-14T15:37:37.422Z</lastmodifieddate>
<hs_object_id>404861480135</hs_object_id>
<createdate>2025-08-14T07:37:29.965Z</createdate>
<email>emailmaria@hubspot.com</email>
<lastname>Johnson (Sample Contact)</lastname>
</properties>
<updatedAt>2025-08-14T15:37:37.422Z</updatedAt>
</results>
...
...
<results>
<createdAt>2025-10-14T06:39:05.099Z</createdAt>
<archived>false</archived>
<id>483386338550</id>
<url>https://app-eu1.hubspot.com/contacts/146727578/record/0-1/483386338550</url>
<properties>
<firstname>John</firstname>
<lastmodifieddate>2025-10-14T14:26:00.680Z</lastmodifieddate>
<hs_object_id>483386338550</hs_object_id>
<createdate>2025-10-14T06:39:05.099Z</createdate>
<email>john.doe@example.com</email>
<lastname>Doe</lastname>
</properties>
<updatedAt>2025-10-14T14:26:00.680Z</updatedAt>
</results>
</root>
- •The Create Object action inserts a single record for the specified entity type.
You must specify the path parameters and request body for the object that you want to create. Additionally, provide values for the queryParameters field, if required.
Example: Creating notes
The following snippet is a sample input for the pathParameters field:
<root>
<pathParameter>crm</pathParameter>
<pathParameter>v3</pathParameter>
<pathParameter>objects</pathParameter>
<pathParameter>notes</pathParameter>
</root>
The following snippet is a sample request body:
<root>
<properties>
<hs_note_body>Contacted client about pricing</hs_note_body>
<hs_timestamp>2025-11-17T01:32:44.872Z</hs_timestamp>
</properties>
</root>
The following snippet is a sample response body:
<root>
<createdAt>2025-10-28T15:27:36.245Z</createdAt>
<archived>false</archived>
<id>329136066770</id>
<url>https://app-eu1.hubspot.com/contacts/146727578/record/0-46/329136066770</url>
<properties>
<hs_timestamp>2025-11-17T01:32:44.872Z</hs_timestamp>
<hs_lastmodifieddate>2025-10-28T15:27:36.245Z</hs_lastmodifieddate>
<hs_object_source_id>17898842</hs_object_source_id>
<hs_body_preview_html><html>
<head></head>
<body>
Contacted client about pricing
</body>
</html></hs_body_preview_html>
<hs_obj_coords>0-46-329136066770</hs_obj_coords>
<hs_createdate>2025-10-28T15:27:36.245Z</hs_createdate>
<hs_object_id>329136066770</hs_object_id>
<hs_object_source>INTEGRATION</hs_object_source>
<hs_note_body>Contacted client about pricing</hs_note_body>
<hs_body_preview_is_truncated>false</hs_body_preview_is_truncated>
<hs_body_preview>Contacted client about pricing</hs_body_preview>
<hs_object_source_label>INTEGRATION</hs_object_source_label>
</properties>
<updatedAt>2025-10-28T15:27:36.245Z</updatedAt>
</root>
- •The Update Object action updates the specified record with the name-value pairs of the parameters included in the request body.
You must specify the path parameters and request body for the object that you want to update. Additionally, provide values for the queryParameters field, if required.
Example: Updating a meeting
The following snippet is a sample input for the pathParameters field:
<root>
<pathParameter>crm</pathParameter>
<pathParameter>v3</pathParameter>
<pathParameter>objects</pathParameter>
<pathParameter>meetings</pathParameter>
<pathParameter>266126487794</pathParameter>
</root>
The following snippet is a sample request body:
<root>
<properties>
<hs_meeting_title>Updated title</hs_meeting_title>
</properties>
</root>
The following snippet is a sample response:
<root>
<createdAt>2025-08-17T07:37:30.739Z</createdAt>
<archived>false</archived>
<id>266126487794</id>
<url>https://app-eu1.hubspot.com/contacts/146727578/record/0-47/266126487794</url>
<properties>
<hs_lastmodifieddate>2025-10-14T07:38:17.482Z</hs_lastmodifieddate>
<hs_object_source_id>sample-contact</hs_object_source_id>
<hs_meeting_title>Updated title</hs_meeting_title>
<hs_obj_coords>0-47-266126487794</hs_obj_coords>
<hs_createdate>2025-08-17T07:37:30.739Z</hs_createdate>
<hs_object_id>266126487794</hs_object_id>
<hs_object_source>INTERNAL_PROCESSING</hs_object_source>
<hs_object_source_label>INTERNAL_PROCESSING</hs_object_source_label>
</properties>
<updatedAt>2025-10-14T07:38:17.482Z</updatedAt>
</root>
- •The Delete Object action deletes the specified record of the given entity type.
You must specify the path parameters for the object that you want to delete. Additionally, provide values for the queryParameters field, if required.
Example: Deleting a company
The following snippet is a sample input for the pathParameters field:
<root>
<pathParameter>crm</pathParameter>
<pathParameter>v3</pathParameter>
<pathParameter>objects</pathParameter>
<pathParameter>companies</pathParameter>
<pathParameter>256294758628</pathParameter>
</root>
The above set of path parameters contains the ID of the company to be deleted.
The Delete Object action returns a 204 No Content response.
- •The Upsert Object action upserts the specified record of a given entity type.
You must specify the path parameters and the request body for the object that you want to upsert. Additionally, provide values for the queryParameters field, if required.
Example: Updating a meeting
The following snippet is a sample input for the pathParameters field:
<root>
<pathParameter>marketing</pathParameter>
<pathParameter>v3</pathParameter>
<pathParameter>marketing-events</pathParameter>
<pathParameter>associations</pathParameter>
<pathParameter>854707947747</pathParameter>
<pathParameter>lists</pathParameter>
<pathParameter>4</pathParameter>
</root>
The Upsert Object action returns a 204 No Content response.