Nov 24, 20259:18 AM - edited Nov 24, 20259:23 AM
Contributor | Gold Partner
How to get my files out of hubspot. Is the only option Via API, and how would i structure it so i know to which record the files belong to. But for now, at the very least can i just download all files to have a file dump of some sort
that bulk export pain is very real, especially once you hit rate limits and start seeing private files fail.
For the “file dump,” the closest you get natively is scripting against the Files API search endpoint, paging through all files and then downloading via the file URL or signed URL for private ones (GET /files/v3/files/search + /files/v3/files/{fileId}/signed-url).
That lets you include both public and private files, filter by createdAt, and iterate until you’ve pulled everything (respecting the usage guidelines on rate limits and adding a small delay or retries in your script)
The harder part is associations. Most “attachments” in the CRM aren’t first-class file associations, they’re usually files linked via notes or form submissions. For notes, you can pull notes associated to contacts/deals and read hs_attachment_ids, then map those IDs back to files with the Files API
For form uploads, you typically have to combine form submission data with the Files API so you keep a file > submission > contact/deal chain. If you share which objects matter most in your migration, it’s easier to narrow which of those joins you actually need. If consistency between HubSpot and your finance or ops system is the gap, "Stacksync" keeps them mirrored as changes happen.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
that bulk export pain is very real, especially once you hit rate limits and start seeing private files fail.
For the “file dump,” the closest you get natively is scripting against the Files API search endpoint, paging through all files and then downloading via the file URL or signed URL for private ones (GET /files/v3/files/search + /files/v3/files/{fileId}/signed-url).
That lets you include both public and private files, filter by createdAt, and iterate until you’ve pulled everything (respecting the usage guidelines on rate limits and adding a small delay or retries in your script)
The harder part is associations. Most “attachments” in the CRM aren’t first-class file associations, they’re usually files linked via notes or form submissions. For notes, you can pull notes associated to contacts/deals and read hs_attachment_ids, then map those IDs back to files with the Files API
For form uploads, you typically have to combine form submission data with the Files API so you keep a file > submission > contact/deal chain. If you share which objects matter most in your migration, it’s easier to narrow which of those joins you actually need. If consistency between HubSpot and your finance or ops system is the gap, "Stacksync" keeps them mirrored as changes happen.
Did my answer help? Please mark it as a solution to help others find it too.
Ruben Burdin HubSpot Advisor Founder @ Stacksync Real-Time Data Sync between any CRM and Database
thx Ruben for your time, i appreciate. my first concern is now just getting the file uploads, but you bring important points like attachments. so thank you for that.
Hi, Jaycee, im referring to ALL files, ones uploaded via form fields also (these dont show up on the app, its apparently hidden. So im busy wih code to try get it via Files API
Thank you for the information, however, im trying to do a bulk export of all files on HS for migration purposes. And i struggle to find working API code. i hit rate limits and struggle with certain files - private files. i also have to get the associatons records of these files