# Getting attached files from deal

**URL:** <https://community.hubspot.com/t/getting-attached-files-from-deal/119791>\
**Category:** APIs & Integrations\
**Tags:** object\
**Created:** [November 4, 2024, 10:21pm UTC](https://community.hubspot.com/t/getting-attached-files-from-deal/119791 "2024-11-04T22:21:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![MBevell](https://avatars.discourse-cdn.com/v4/letter/m/779978/32.png) [@MBevell](https://community.hubspot.com/u/MBevell)\
**Post date:** [November 4, 2024, 10:21pm UTC](https://community.hubspot.com/t/getting-attached-files-from-deal/119791/1 "2024-11-04T22:21:46Z")

</div>

I’m trying to use GET /crm/v4/objects/{fromObjectType}/{objectId}/associations/{toObjectType}  
in order to get all files attached to a specific deal.  
fromObjectType(0-3) and objectId are easy to figure out, but i cannot find the Object type ID for files  
am I missing something I should find here → [Understanding the CRM APIs - HubSpot docs](https://developers.hubspot.com/beta-docs/guides/api/crm/understanding-the-crm#object-type-ids)

---

<div class="post-metadata">

**Author:** ![SteveHTM](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/stevehtm/32/22074_2.png) [@SteveHTM](https://community.hubspot.com/u/SteveHTM)\
**Post date:** [November 5, 2024, 6:09pm UTC](https://community.hubspot.com/t/getting-attached-files-from-deal/119791/2 "2024-11-05T18:09:14Z")

</div>

@MBevell - Files are not associated objects for a Contact/Deal etc. For whatever reason they are tied to engagements on the record. You will need to list those engagements to find attachments which resolve to FileIds.

Steve
