I want to implement the following use case and I'm not sure how to do this with the Hubspot API and I don't find any solution within the documentation.
I created a custom request flow which is creating contacts and deals within Hubspot programmatically via the API in the next step the user should upload documents related to his case and I would like to upload and associate these documents with the related deal. Could someone help me or point me to the right spot in the documentation on how such a scenario can be established with the API.
I got the following answer on the community board of Hubspot which worked for me:
You can upload a File (and set the permissions) using the CMS Files API.
Once you've upload the file you can the associate the file to your deal (using the File ID returned from the CMS Files API) with the Create Engagement API. Link: https://community.hubspot.com/t5/APIs-Integrations/Upload-File-to-a-contact/m-p/398156#M39358