I am looking for a solution to download the files that are located under Deals.
I was able to retrieve the engagements (attachment_id, cloud key) but I can't come with a solution to download the file.
I have a task in which the webhook calls my server when a deal is closed. I run some tasks in the background and I need the ability to download the files attached there as well.
Upon retrieving the attachment IDs, you can query this endpoint - Get file metadata | CMS Files API with the file IDs and from the return response, the url field will lead you to the file.
Thank you for the feedback! For this case, if you haven't already, I'd recommend jumping over to the HubSpot Ideas Forum and posting this idea there so that it's visible to the HubSpot product team and other HubSpot customers and developers. Hopefully this will gather more interest.