Webhook from New Message is not including ThreadID

I have created an app and subscribed to convesration.newMessage
When a new message is typed, I get a webhook with the following information on it:

  • eventId
  • subscriptionId
  • portalId
  • appId
  • occurredAt
  • subscriptionType
  • attemptNumber
  • objectId
  • messageId
  • messageType
  • changeFlag

To retrieve the content of the specific message, I need to call
https://api.hubapi.com/conversations/v3/conversations/threads/\/messages/<messageID>
I have the messageID from the webhook, but how can I get the threadID if it does not seem to be included in the webhook?
Thanks :slightly_smiling_face:

Hey, @Bubusi :waving_hand: Thanks for reaching out. I reviewed the Webhook documentation for Conversations and messages. But as you found, I don’t see a way to get at the thread ID this way.

I answered a similar question here. The tldr is that you can get at this ID from the GET threads endpoint. It will include the `thread ID` as `ID`.

GET conversations/v3/conversations/threads

This endpoint offers sort and filter options as well.

I hope this helps! Please let me know if this isn’t what you are after. — Jaycee

Thanks Jaycee,
Yes, I saw your answer to a similar question before sending mine, but I did not consider it solved my problem because it does not filter by a specific messageId, not without also adding the threadId, which defeats the purpose.
I’m quite surpised that they require the threadId to retreive a message, considering how the messageId is by itself a uuid. It would be great if either Hubspot provided the threadId in the webhook or did not require the threadId in the GET call for a specific message. Othrwise I don’t see a solution to this problem.

The “objectId” in your webhook data refers to the thread ID. Use it as the threadID when making an API call to fetch the contents of a specific message.

There’s no objectId in the webhook.

Hi @Bubusi Have you come up with a workaround here? Razmik’s answer doesn’t help.
If only the webhook has the text context or at least the threadId, it would be easier. It such a pain developing with Hubspot, unlike GHL.