HubSpot provides the Engagements API to allow the recording of a task or activity against an object in HubSpot.
To create an engagement, use the ‘Create an Engagement’ endpoint, passing the relevant contact, company or deal associations within the call. Note the ‘id’ field within the engagement object which is returned; this is the ‘engagementId’, which is the unique identifier of the engagement within HubSpot, and should be stored within your own infrastructure against the relevant object to identify the engagement in the event that wish need to update it in the future.
To update an engagement, use the ‘Update an Engagement’ endpoint, passing the relevant ‘engagementId’ within the destination of the call, and the updated fields in JSON within the body.
You can delete an Engagement by using the ‘Delete an Engagement’ endpoint, passing the relevant ‘engagmentId’ with the call.