Conversations API Beta

aaviles_nds
Member

How to post a message with an attachment

Hello,

 

We want our clients to be able to POST messages with attachments to our agents. When looking at the "Send a message to a thread" request we see that there is a field named "attachments" which is an array of dicts where every dict looks like this: {"fileId": 0}

 

To which API and endpoint do we have to POST the attachment in order to receive the fileId needed to send this request?

 

Thank you.

0 Upvotes
1 Reply 1
pleninger
HubSpot Product Team
HubSpot Product Team

How to post a message with an attachment

👋Hi @aaviles_nds,

 

Before attaching a file to a message, you must first upload it using the Files API: https://developers.hubspot.com/docs/api/files/files.

 

You can use the file id that you get from that service to attach files to comments or messages.

 

Paul

 

0 Upvotes