APIs & Integrations

prozdev
Participant

Accessing the "File upload" property on a ticket via API

From the HubSpot tickets view, clicking on "view all properties" shows there's one called File upload, which is set to a CDN url if a user attached a file from the support form HubSpot provides. I'd like to access this via API so I can know when a file as attached to a ticket. Currently, I can see it as a "Note" engagement, but we'd like to preserve notes for internal use only.

Is it currently possible to access this property? I couldn't find it on this list: https://developers.hubspot.com/docs/methods/crm-properties/get-properties

Thanks for any help!

0 Upvotes
3 Replies 3
cbarley
HubSpot Alumni
HubSpot Alumni

Accessing the "File upload" property on a ticket via API

Hey @kakigori, you should have access to GET this property. If you make a GET to this endpoint: https://developers.hubspot.com/docs/methods/crm-properties/get-properties you'll see the file upload property (hs_file_upload) is available to use. It's just not detailed in the JSON response in the docs. As we add more default properties, the response would be pretty long on that page so we haven't updated it.

That said, this file upload property is provided by HubSpot and cannot be edited as per the Properties Settings page description here:

The only way these attachments can be added is through the Support Form in Service Hub.

0 Upvotes
yorambaron
Participant

Accessing the "File upload" property on a ticket via API

Hello,

 

I am converting a ticket entity from another system to HubSpot.

How can I create an attachment to a ticket by using the API?

Can I update the 'hs_file_upload' property by using this link  or this is a read only property?

If this is not possible, should I associate the attachment to a contact and then associate the ticket to this contact?

 

Is there any other way?

 

Regards,

Yoram

0 Upvotes
yorambaron
Participant

Accessing the "File upload" property on a ticket via API

I found a workaround for this problem until this propert will be added to the ticket.

Following are the workaround steps:

1. Create a new ticket property (text object)  that should have the URL of the uploaded file name.

2. Upload the file with the upload API:

3.The new property should set the full URL that was created, it should be in the following format:

https://app.hubspot.com/file-manager-beta/<id><file-name> where id stands for your HubSpot ID.

 

Regards,

Yoram

0 Upvotes