Is there a unified API endpoint to retrieve all attachments from a Company/Deal regardless of source

SVenkatesan
Contributor

I'm working on a project to retrieve all attachments associated with Companies and Deals in HubSpot, and I'm running into some challenges with the current API structure.

Current Situation:  Currently, to get attachments, I have to:

  1. Get all engagements associated with the company/deal (using associations API)

  2. Fetch each engagement individually to check for attachments

  3. Extract attachment IDs from the engagement's attachments array

  4. Get file metadata for each attachment

This requires multiple API calls for each company/deal and is quite complex.

What I Need: I'm looking for a way to retrieve ALL attachments associated with a Company or Deal in a single (or fewer) API call(s), regardless of where they were attached from:

  • Notes

  • Emails

  • Calls

  • Meetings

  • Tasks

  • Or any other engagement type

Questions:

  1. Is there a unified API endpoint that returns all attachments for a given Company ID or Deal ID without having to iterate through individual engagements?

  2. If not, is there a more efficient way to batch retrieve attachments than the current approach of:

    • Get associations - Get each engagement - Extract attachment IDs  - Get file metadata?

  3. Are there any plans to add a direct endpoint like this.

Any guidance, workarounds, or product roadmap insights would be greatly appreciated! Thank you in advance for your help

0 Upvotes
2 Replies 2
SVenkatesan
Contributor

@Ben_M@alyssamwilie, and @Mike_Eastwood - any thoughts on this setup would be helpful.

0 Upvotes
STierney
Community Manager
Community Manager

Hey @SVenkatesan - thanks for posting in the Community!

I'd like to tag in some API experts here to see if they have any insight for us! @Ben_M, @alyssamwilie, and @Mike_Eastwood - any thoughts on this setup?


Shane, Senior Community Moderator





loop


Loop Marketing is a new four-stage approach that combines AI efficiency and human authenticity to drive growth.

Learn More




0 Upvotes