APIs & Integrations

thulani
Member

Attaching files to object via the APIs

SOLVE

How can one attach files to objects (deals, contacts, companies etc) using the APIs. I am seeing some activity on this question in the community with no definete answers.

The Files API documentation hints at this being possible via the engagemetns API

 

a.png

Looking however at engagements, it appears as though there is no support for files

 

b.png

How can this be achieved?

 

Thanks

 

0 Upvotes
1 Accepted solution
Jaycee_Lewis
Solution
Community Manager
Community Manager

Attaching files to object via the APIs

SOLVE

Hi, @thulani 👋 I have an example here — Attach file to deal record using API

 

The quick version — 

  • Upload the file
  • Create a Note
  • Associate the File to the Note
  • Associate the Note to the Object

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

View solution in original post

0 Upvotes
3 Replies 3
Jaycee_Lewis
Solution
Community Manager
Community Manager

Attaching files to object via the APIs

SOLVE

Hi, @thulani 👋 I have an example here — Attach file to deal record using API

 

The quick version — 

  • Upload the file
  • Create a Note
  • Associate the File to the Note
  • Associate the Note to the Object

Have fun building! — Jaycee

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Upvotes
lstepany
Contributor | Elite Partner
Contributor | Elite Partner

Attaching files to object via the APIs

SOLVE

Hi @Jaycee_Lewis 

 

This solution is indeed working well and I have used it, however it seems like there is a limit for uploading files into the file manager. I have about 3000 files but I am able to upload olny 250 files.

I have noticed that if I attach an external file to the object it doesn't go to file manager  but stays attached to the object. And if I attach a file using API I have to upload to filemanager first which has a limit then if I delete thefile from the file manager it disapears from attached object as well. Is there any  solution for attaching big amount of files to objects via API?

 

0 Upvotes
thulani
Member

Attaching files to object via the APIs

SOLVE

Thanks for the quick response. I will give this a try and mark this as the solution if all goes well. 

 

I really appreciate how quick you responded here 😄