CRM

John7
Member

Attachments

As mentioned in this documentation , tried giving properties=hs_attachment_ids . Eventhough I have attachment , the value of 'hs_attachment_ids' is null.

 

In a record , I have an attachment . How do I get all the attachments with its parent record details through API (private app)  without knowing fileIDs?

0 Upvotes
1 Reply 1
Jaycee_Lewis
Community Manager
Community Manager

Attachments

Hey, @John7 👋 Thanks for your question. There isn't a direct endpoint we can use. The main issue is how files are stored as attachments to a Note on an object record when uploaded via the API. 

 

There isn't a way around having the file ID to retrieve and download files. You'll need to use the Get a Signed URL to Access a Private File endpoint with these file IDs to generate a download link. 

My test requests looked like this:

HTTP 200

{
 "id": "30561996841",
 "properties": {
   "hs_attachment_ids": "100185404582",
   "hs_createdate": "2023-01-27T17:49:19.810Z",
   "hs_lastmodifieddate": "2023-01-27T17:49:19.810Z",
   "hs_object_id": "30561996841"
 },
 "createdAt": "2023-01-27T17:49:19.810Z",
 "updatedAt": "2023-01-27T17:49:19.810Z",
 "archived": false
}

 

Have fun testing! — Jaycee


HubSpot’s AI-powered customer agent resolves up to 50% of customer queries instantly, with some customers reaching up to 90% resolution rates.
Learn More.


Did you know that the Community is available in other languages?
Join regional conversations by changing your language settings !
0 Upvotes