APIs & Integrations

Not applicable

Uploading Contact Note Attachment?

We are looking to create a app that will create contact Notes (engagement) via the HubSpot API.

We would like to be able to attach PDF files to these Notes. The only way that I see doing it is using the COS Files API to upload the file then use the file’s ID in the Note’s attachment array. Is this correct?

Would any file uploaded via the COS Files API then be available to users via “Shared Files”? We don’t want this. We’d like to only have the uploaded files available via viewing the contact’s note (the same as it is when you create an attachment via the “upload” option in the UI).

Please advise.

0 Upvotes
2 Replies 2
Derek_Gervais
HubSpot Alumni
HubSpot Alumni

Uploading Contact Note Attachment?

Hi @homerlex,

If you upload a file to the file manager using the ‘Upload a new file’ endpoint, you can include hidden: true in the post body to make the file hidden in the file manager. Then, you can include the file ID in the attachments of the note engagement you create to replicate using the ‘attach’ feature in the UI. Bear in mind that the files will only be accessible through the UI via the contact record the note appears. I’ll work on updating the documentation now.

0 Upvotes
Not applicable

Uploading Contact Note Attachment?

Perfect. Thanks a bunch.