# V3 File Explicit Association (Persistent 404 Error)

**URL:** <https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293>\
**Category:** APIs & Integrations\
**Tags:** developer-tools\
**Created:** [November 24, 2025, 7:33pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293 "2025-11-24T19:33:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GMoreira0](https://avatars.discourse-cdn.com/v4/letter/g/f04885/32.png) [@GMoreira0](https://community.hubspot.com/u/GMoreira0)\
**Post date:** [November 24, 2025, 7:33pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293/1 "2025-11-24T19:33:20Z")

</div>

We’re facing a critical issue that’s **preventing the association of Files to CRM Objects (Notes/Deals)** using a **Private App Token** within a Custom Code Action.

We’ve isolated the problem and confirmed that **Note creation and Deal association work** , but the explicit File association step consistently fails with a **Status 404 (Not Found)**, regardless of the attempted syntax.

Given that a 404 error on an association endpoint strongly suggests the token **cannot find or access** the target File V3 object:

**What is the exact permission (Scope) required for a Private App Token to successfully associate existing Files (V3) to CRM Objects (V3) using the explicit association endpoints (/associations/files/{fileId})?**

Is the general **files** scope insufficient, or is a specific scope like **files.read.all** needed for the association API to locate the file object successfully?

Any insight or experience from developers who have overcome this specific permission issue with V3 File APIs and Private App Tokens would be greatly appreciated!

Thank you! 🙏

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [November 24, 2025, 8:43pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293/2 "2025-11-24T20:43:59Z")

</div>

Hey, @GMoreira0 👋 Thanks for posting. A few quick questions:

- could you share a simplified raw request (JSON payload and the Endpoint URL) or a cURL command of the step that is failing? (Please redact your actual Access Token)
- are these files that were uploaded uploaded with `access: “PRIVATE”`?
- Is your goal to update files as “associated files” on an Object record using the Notes to Object association?

Thanks! — Jaycee

---

<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 25, 2025, 3:11pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293/3 "2025-11-25T15:11:05Z")

</div>

@GMoreira0 - the scope for file API access have some subtlety. The error returned for a private/uploaded/attached file tends to be 404 unless you specifically add the scope related to hidden access. I would have hoped for a more specific error code, but thats the way things are.

 ![SteveHTM_0-1764083394455.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/7/6/76e5a17d4193728af092c6a51346c8c9d3b4b14c.png)

Hope this is helpful.

Steve

---

<div class="post-metadata">

**Author:** ![RubenBurdin](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rubenburdin/32/75212_2.png) [@RubenBurdin](https://community.hubspot.com/u/RubenBurdin)\
**Post date:** [November 28, 2025, 5:57pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293/4 "2025-11-28T17:57:14Z")

</div>

Hi @GMoreira0 ,

If your goal is to attach an uploaded HubSpot file to a note on a deal, you shouldn’t need to create a separate file-to-deal association. Create the note with the file ID in `hs_attachment_ids`, then associate the note with the deal. If retrieving the file itself still returns a 404, check the file’s access level and make sure your app has the appropriate Files API permissions. Also verify that you’re using the file ID returned by the current Files API.

You’re right to suspect scopes here. A 404 can be related to file access, but first confirm that you’re using the supported method for attaching the file. To attach a file to a note, set the note’s `hs_attachment_ids` property to the file ID, then associate the note with the target CRM record.

If you also need to retrieve or otherwise access a private or hidden file through the Files API, verify that the app has the scopes required for that file’s access level. A 404 from a Files API request can indicate that the authenticated app cannot access the requested file. In practice, that means enabling files plus the “View files included in hidden properties and non-indexed files” permission on the app, which maps to the hidden-files access described in the Files API docs ([Files API - HubSpot docs](https://developers.hubspot.com/docs/api-reference/files-files-v3/guide) )

Without that, any association call that touches a private upload will return 404, even though your note or deal calls work fine. Make sure `hs_attachment_ids` contains the HubSpot file ID returned by the Files API. The CRM association should be between the note and the target CRM record; the file itself is attached to the note through `hs_attachment_ids.` ([Associate records - HubSpot docs](https://developers.hubspot.com/docs/api-reference/crm-associations-v4/guide) )

_Moderator Note: this post was reviewed for relevancy and optimized for clarity on September 29, 2026. Thank you for your contributions to the HubSpot Community!_

---

<div class="post-metadata">

**Author:** ![GRajput](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/grajput/32/102020_2.png) [@GRajput](https://community.hubspot.com/u/GRajput)\
**Post date:** [December 3, 2025, 12:21pm UTC](https://community.hubspot.com/t/v3-file-explicit-association-persistent-404-error/143293/5 "2025-12-03T12:21:05Z")

</div>

Hi @GMoreira0  
Please refer to the screenshot provided of the required scopes. Once you provide all these scopes to the app, it will work as per the requirement. Here is the doc link - [Accounts Dashboard | HubSpot](https://developers.hubspot.com/docs/api-reference/files-files-v3/files/get-files-v3-files-fileId#required-scopes)

 ![GRajput_0-1764764444692.png](https://d2qpr2jzcazej7.cloudfront.net/original/3X/c/c/cca6e29b45a394f71eca3c87c5a34ff42c952cf6.png)

I hope this will help you out. Please mark it as **Solution Accepted and upvote** to help another Community member.

Thanks!
